diff options
author | Mathias Agopian <mathias@google.com> | 2012-11-05 17:50:57 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-11-05 17:50:57 -0800 |
commit | 02b95105754b1859a97e234b79f41489a4677c20 (patch) | |
tree | 3d6d537b1187b7cb79d36ba395d1fe3f446a3042 | |
parent | 2281af967dd840aade7bc55b19ea7df0e6da36f2 (diff) | |
download | frameworks_native-02b95105754b1859a97e234b79f41489a4677c20.zip frameworks_native-02b95105754b1859a97e234b79f41489a4677c20.tar.gz frameworks_native-02b95105754b1859a97e234b79f41489a4677c20.tar.bz2 |
fix transitions from hwc to GLES compositionandroid-sdk-support_r11
If we switched from HWC to GLES but the dirty region was empty
(could happen if the dirty region is outside of the screen for instance), we
need to force a full screen composition.
In this change we ignore the dirty region for the purpose of
rejecting the whole update and we rely on the fact that it will later
be expanded to the whole screen. This was the least risky fix.
Bug: 7467760, 7452931
Change-Id: I2132f2f963b00a3ce7150adadb107b0367b3862e
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 7ee6e5e..ce10c78 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -978,10 +978,10 @@ void SurfaceFlinger::doComposition() { if (hw->canDraw()) { // transform the dirty region into this screen's coordinate space const Region dirtyRegion(hw->getDirtyRegion(repaintEverything)); - if (!dirtyRegion.isEmpty()) { - // repaint the framebuffer (if needed) - doDisplayComposition(hw, dirtyRegion); - } + + // repaint the framebuffer (if needed) + doDisplayComposition(hw, dirtyRegion); + hw->dirtyRegion.clear(); hw->flip(hw->swapRegion); hw->swapRegion.clear(); |