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
This commit is contained in:
Ricardo Cerqueira 2013-10-26 03:43:03 +01:00 committed by Ethan Chen
parent ff59fbd819
commit f4fac7e93f
1 changed files with 7 additions and 1 deletions

View File

@ -683,6 +683,12 @@ status_t SurfaceComposerClient::getAnimationFrameStats(FrameStats* outStats) {
// ----------------------------------------------------------------------------
#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,
@ -692,7 +698,7 @@ status_t ScreenshotClient::capture(
if (s == NULL) return NO_INIT;
return s->captureScreen(display, producer, sourceCrop,
reqWidth, reqHeight, minLayerZ, maxLayerZ, useIdentityTransform,
ISurfaceComposer::eRotateNone, false);
ISurfaceComposer::eRotateNone, SS_CPU_CONSUMER);
}
ScreenshotClient::ScreenshotClient()