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

Commit 540345f7 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Steve Kondik
Browse files

Support forcing all screenshots into a CPU consumer

Looks like a full GPU path is less efficient on some GPU
drivers that we're still using, and CPU is reliably faster...
(there's probably a locking condition going on somewhere, this
needs to be looked into)

Change-Id: I8878796a117d65bf2324507cf8755cadce49f6dc
parent 5f695d3d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -686,6 +686,12 @@ ssize_t SurfaceComposerClient::getDisplayOrientation(int32_t displayId) {

// ----------------------------------------------------------------------------

#ifndef FORCE_SCREENSHOT_CPU_PATH
#define SS_CPU_CONSUMER false
#else
#define SS_CPU_CONSUMER true
#endif

status_t ScreenshotClient::capture(
        const sp<IBinder>& display,
        const sp<IGraphicBufferProducer>& producer,
@@ -695,7 +701,7 @@ status_t ScreenshotClient::capture(
    if (s == NULL) return NO_INIT;
    return s->captureScreen(display, producer,
            reqWidth, reqHeight, minLayerZ, maxLayerZ,
            false);
            SS_CPU_CONSUMER);
}

ScreenshotClient::ScreenshotClient()