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

Commit 718f3c2e authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Revert "add BoardConfig flag TARGET_USES_OPENGLES_FOR_SCREEN_CAPTURE"

This reverts commit db66fbf4.
Turns out the test results in the GN were skewed by another bug. We _can_ just remove the useReadPixels check and do away with the need for a board flag

Change-Id: I084e7bbf4c2435b9656fa30e7ce130237b7f57c5
parent 753e3c84
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -80,10 +80,6 @@ else
    LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
endif

ifeq ($(TARGET_USES_OPENGLES_FOR_SCREEN_CAPTURE),true)
	LOCAL_CFLAGS += -DUSE_OPENGLES_FOR_SCREEN_CAPTURE
endif

LOCAL_CFLAGS += -fvisibility=hidden

LOCAL_SHARED_LIBRARIES := \
+0 −5
Original line number Diff line number Diff line
@@ -3133,14 +3133,9 @@ status_t SurfaceFlinger::captureScreenImplLocked(
    status_t result = NO_ERROR;
    if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) == NO_ERROR) {
        uint32_t usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN;
#ifdef USE_OPENGLES_FOR_SCREEN_CAPTURE
        // Make sure that HW_RENDER and HW_TEXTURE flags are used regardless of useReadPixels value
        usage |= GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE;
#else
        if (!useReadPixels) {
            usage |= GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_TEXTURE;
        }
#endif

        int err = 0;
        err = native_window_set_buffers_dimensions(window, reqWidth, reqHeight);