summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/DisplayHardware
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2013-09-30 16:49:30 -0700
committerJesse Hall <jessehall@google.com>2013-09-30 17:08:28 -0700
commitd05a17fbb3772051d287f1f8830a7f00964f7ec2 (patch)
tree2d288f9b3d01140c5a57bfcccda10b5c1b7957bc /services/surfaceflinger/DisplayHardware
parent86206b41b2ff000e086301c6bafb8da577e563b2 (diff)
downloadframeworks_native-d05a17fbb3772051d287f1f8830a7f00964f7ec2.zip
frameworks_native-d05a17fbb3772051d287f1f8830a7f00964f7ec2.tar.gz
frameworks_native-d05a17fbb3772051d287f1f8830a7f00964f7ec2.tar.bz2
Treat composition frames with no layers as using GLES composition
When there are no window layers for a display, SurfaceFlinger clears the undefined region using GLES. Some of the places that check for GLES composition weren't considering this special case, in particular: - We were skipping the eglSwapBuffers() on these frames. - We were putting VirtualDisplaySurface in HWC-only composition mode. This change centralizes the logic for this special case. Bug: 10957068 Change-Id: I2deaf2ed101e8ea76708862a6bb67751b6078794
Diffstat (limited to 'services/surfaceflinger/DisplayHardware')
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index c851a2c..7132b2f 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -611,6 +611,10 @@ status_t HWComposer::prepare() {
// here we're just making sure that "skip" layers are set
// to HWC_FRAMEBUFFER and we're also counting how many layers
// we have of each type.
+ //
+ // If there are no window layers, we treat the display has having FB
+ // composition, because SurfaceFlinger will use GLES to draw the
+ // wormhole region.
for (size_t i=0 ; i<mNumDisplays ; i++) {
DisplayData& disp(mDisplayData[i]);
disp.hasFbComp = false;
@@ -632,6 +636,11 @@ status_t HWComposer::prepare() {
disp.hasOvComp = true;
}
}
+ if (disp.list->numHwLayers == (disp.framebufferTarget ? 1 : 0)) {
+ disp.hasFbComp = true;
+ }
+ } else {
+ disp.hasFbComp = true;
}
}
}