diff options
author | Mathias Agopian <mathias@google.com> | 2011-09-22 21:01:21 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-09-22 21:01:21 -0700 |
commit | 0c92e4d7474be3acf08038073d0e3b26ea643884 (patch) | |
tree | 49bd2fd08e0ff4d72c28ac7dfb305b62d68ac128 /services/surfaceflinger | |
parent | 9f12c8b47bc5d7ba12de90df78c026d93da5231d (diff) | |
parent | 9fe96541c349f87caae10f3c94ed30e8153b15e5 (diff) | |
download | frameworks_base-0c92e4d7474be3acf08038073d0e3b26ea643884.zip frameworks_base-0c92e4d7474be3acf08038073d0e3b26ea643884.tar.gz frameworks_base-0c92e4d7474be3acf08038073d0e3b26ea643884.tar.bz2 |
Merge "don't clear the framebuffer when the framebuffer is not used"
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 11 |
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++) { |