summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-09-22 21:01:21 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-22 21:01:21 -0700
commit059fd18396605592ec538b9e5574a80a8987d10d (patch)
tree81e904ced86ff0d345781382171a55eb7a73bce6 /services
parentcfb7d090bbbb881def949a548b7ad8022e370dd4 (diff)
parentcd20eb09c4752531c1ab1a0084474ef530a5d44f (diff)
downloadframeworks_native-059fd18396605592ec538b9e5574a80a8987d10d.zip
frameworks_native-059fd18396605592ec538b9e5574a80a8987d10d.tar.gz
frameworks_native-059fd18396605592ec538b9e5574a80a8987d10d.tar.bz2
Merge "don't clear the framebuffer when the framebuffer is not used"
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 09097ee..3f154ce 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -986,19 +986,20 @@ void SurfaceFlinger::setupHardwareComposer(Region& dirtyInOut)
void SurfaceFlinger::composeSurfaces(const Region& dirty)
{
- if (UNLIKELY(!mWormholeRegion.isEmpty())) {
+ const DisplayHardware& hw(graphicPlane(0).displayHardware());
+ HWComposer& hwc(hw.getHwComposer());
+
+ const size_t fbLayerCount = hwc.getLayerCount(HWC_FRAMEBUFFER);
+ if (UNLIKELY(fbLayerCount && !mWormholeRegion.isEmpty())) {
// should never happen unless the window manager has a bug
// draw something...
drawWormhole();
}
- const DisplayHardware& hw(graphicPlane(0).displayHardware());
- HWComposer& hwc(hw.getHwComposer());
- hwc_layer_t* const cur(hwc.getLayers());
-
/*
* and then, render the layers targeted at the framebuffer
*/
+ hwc_layer_t* const cur(hwc.getLayers());
const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ);
size_t count = layers.size();
for (size_t i=0 ; i<count ; i++) {