summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-09-16 21:27:54 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-09-16 21:27:54 -0400
commit75c4d498776a189f37e3d0294c9eda9ed51f6534 (patch)
tree6499144a5b2d4115e350c4e75c7c43f830ce2406 /libs/surfaceflinger
parentb8eb1cb79b2912b91a1b0198ba3e61776af07a79 (diff)
parent7cf03bace826631259aaa5ddc87a517e13bdee17 (diff)
downloadframeworks_base-75c4d498776a189f37e3d0294c9eda9ed51f6534.zip
frameworks_base-75c4d498776a189f37e3d0294c9eda9ed51f6534.tar.gz
frameworks_base-75c4d498776a189f37e3d0294c9eda9ed51f6534.tar.bz2
Merge change 25423 into eclair
* changes: fix [2119400] sholes: artifacting when switching orientation
Diffstat (limited to 'libs/surfaceflinger')
-rw-r--r--libs/surfaceflinger/Layer.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
index 1e7f1e6..7387c85 100644
--- a/libs/surfaceflinger/Layer.cpp
+++ b/libs/surfaceflinger/Layer.cpp
@@ -303,7 +303,6 @@ uint32_t Layer::doTransaction(uint32_t flags)
// Index of the back buffer
const bool backbufferChanged = (front.w != temp.w) || (front.h != temp.h);
-
if (backbufferChanged) {
// the size changed, we need to ask our client to request a new buffer
LOGD_IF(DEBUG_RESIZE,
@@ -318,17 +317,6 @@ uint32_t Layer::doTransaction(uint32_t flags)
// buffer, it'll get the new size.
setDrawingSize(temp.w, temp.h);
- // all buffers need reallocation
- lcblk->reallocate();
-
- // recompute the visible region
- // FIXME: ideally we would do that only when we have received
- // a buffer of the right size
- flags |= Layer::eVisibleRegion;
- this->contentDirty = true;
-
-#if 0
- // FIXME: handle freeze lock
// we're being resized and there is a freeze display request,
// acquire a freeze lock, so that the screen stays put
// until we've redrawn at the new size; this is to avoid
@@ -340,7 +328,12 @@ uint32_t Layer::doTransaction(uint32_t flags)
mFreezeLock = mFlinger->getFreezeLock();
}
}
-#endif
+
+ // recompute the visible region
+ flags |= Layer::eVisibleRegion;
+ this->contentDirty = true;
+ // all buffers need reallocation
+ lcblk->reallocate();
}
if (temp.sequence != front.sequence) {
@@ -382,6 +375,13 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
const Region dirty(lcblk->getDirtyRegion(buf));
mPostedDirtyRegion = dirty.intersect( newFrontBuffer->getBounds() );
+
+ const Layer::State& front(drawingState());
+ if (newFrontBuffer->getWidth() == front.w &&
+ newFrontBuffer->getHeight() ==front.h) {
+ mFreezeLock.clear();
+ }
+
// FIXME: signal an event if we have more buffers waiting
// mFlinger->signalEvent();