summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2016-02-10 17:12:02 -0800
committerEthan Chen <intervigil@gmail.com>2016-02-10 17:20:06 -0800
commit4711655682cfd85d0fc7d6462073917fd2ff2c64 (patch)
tree387cda57ae8714c9cd765d7c003738ef60756125 /services
parent5cb1d7fab2d40a0981462b05b44daa72acc9c9d6 (diff)
downloadframeworks_native-4711655682cfd85d0fc7d6462073917fd2ff2c64.zip
frameworks_native-4711655682cfd85d0fc7d6462073917fd2ff2c64.tar.gz
frameworks_native-4711655682cfd85d0fc7d6462073917fd2ff2c64.tar.bz2
surfaceflinger: Don't allow QC HWC virtual display without QC HWC copy
* QC media encoder appears to be incapable of switching between RGBA8888 buffers and NV12_ENCODEABLE dynamically. This requires that we switch the entire stack to use the QC opaque format, or RGBA8888. REF: CRACKLING-938 Change-Id: Ibd6a8faf8d268d3bfb4d61e4118a778ed82f1ab5
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/DisplayUtils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayUtils.cpp b/services/surfaceflinger/DisplayUtils.cpp
index b2ca166..a07e69e 100644
--- a/services/surfaceflinger/DisplayUtils.cpp
+++ b/services/surfaceflinger/DisplayUtils.cpp
@@ -175,8 +175,14 @@ bool DisplayUtils::canAllocateHwcDisplayIdForVDS(int usage) {
int flag_mask = 0xffffffff;
#ifdef QTI_BSP
+#ifdef FORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
// Reserve hardware acceleration for WFD use-case
flag_mask = GRALLOC_USAGE_PRIVATE_WFD;
+#else
+ // Don't allocate HWC display unless we force HWC copy, otherwise
+ // incompatible buffers are sent to the media stack
+ flag_mask = 0;
+#endif
#endif
return (usage & flag_mask);