Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf268f19 authored by Pablo Ceballos's avatar Pablo Ceballos Committed by android-build-merger
Browse files

SF: Make screenshot surface async am: 605d15af

am: 6d4164bc

Change-Id: I88547ffedb80ee500ff508e1e788852c8806f52d
parents 7e3fde72 6d4164bc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -3638,6 +3638,14 @@ status_t SurfaceFlinger::captureScreenImplLocked(
    // create a surface (because we're a producer, and we need to
    // dequeue/queue a buffer)
    sp<Surface> sur = new Surface(producer, false);

    // Put the screenshot Surface into async mode so that
    // Layer::headFenceHasSignaled will always return true and we'll latch the
    // first buffer regardless of whether or not its acquire fence has
    // signaled. This is needed to avoid a race condition in the rotation
    // animation. See b/30209608
    sur->setAsyncMode(true);

    ANativeWindow* window = sur.get();

    status_t result = native_window_api_connect(window, NATIVE_WINDOW_API_EGL);