mirror of https://github.com/M66B/FairEmail.git
Fixed capturing hardware accelerated images
This commit is contained in:
parent
6480f719ab
commit
8d35d47900
|
@ -713,7 +713,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
|
||||
@Override
|
||||
public void onScrollCaptureImageRequest(@NonNull ScrollCaptureSession session, @NonNull CancellationSignal signal, @NonNull Rect captureArea, @NonNull Consumer<Rect> onComplete) {
|
||||
Canvas canvas = session.getSurface().lockCanvas(rect);
|
||||
//Canvas canvas = session.getSurface().lockCanvas(rect);
|
||||
Canvas canvas = session.getSurface().lockHardwareCanvas();
|
||||
Log.i("Capture draw=" + captureArea + " scroll=" + session.getScrollBounds());
|
||||
try {
|
||||
canvas.save();
|
||||
|
@ -724,6 +725,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
session.getSurface().unlockCanvasAndPost(canvas);
|
||||
}
|
||||
|
||||
Log.i("Capture drawn");
|
||||
onComplete.accept(captureArea);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue