summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-09-30 12:48:47 -0700
committerMathias Agopian <mathias@google.com>2009-09-30 12:48:47 -0700
commit70cab91229c3c2ca4bb75ab63b552ac7d1a6a8bb (patch)
tree09cfd67a7edd7be37754e5ce5fe6d01b3ffd9f5d /libs/surfaceflinger
parente1b6f24423d61b7892e4a59f5a65b04231526712 (diff)
downloadframeworks_base-70cab91229c3c2ca4bb75ab63b552ac7d1a6a8bb.zip
frameworks_base-70cab91229c3c2ca4bb75ab63b552ac7d1a6a8bb.tar.gz
frameworks_base-70cab91229c3c2ca4bb75ab63b552ac7d1a6a8bb.tar.bz2
invalidate the surface when the physical changes
Diffstat (limited to 'libs/surfaceflinger')
-rw-r--r--libs/surfaceflinger/Layer.cpp11
-rw-r--r--libs/surfaceflinger/LayerBase.cpp6
2 files changed, 10 insertions, 7 deletions
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
index d59f205..022388a 100644
--- a/libs/surfaceflinger/Layer.cpp
+++ b/libs/surfaceflinger/Layer.cpp
@@ -330,10 +330,6 @@ uint32_t Layer::doTransaction(uint32_t flags)
int(mBuffers[0]->getWidth()), int(mBuffers[0]->getHeight()),
int(mBuffers[1]->getWidth()), int(mBuffers[1]->getHeight()));
- // record the new size, form this point on, when the client request a
- // buffer, it'll get the new size.
- setDrawingSize(temp.requested_w, temp.requested_h);
-
// 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
@@ -346,9 +342,10 @@ uint32_t Layer::doTransaction(uint32_t flags)
}
}
- // recompute the visible region
- flags |= Layer::eVisibleRegion;
- this->contentDirty = true;
+ // record the new size, form this point on, when the client request a
+ // buffer, it'll get the new size.
+ setDrawingSize(temp.requested_w, temp.requested_h);
+
// all buffers need reallocation
lcblk->reallocate();
}
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp
index df1407d..d83c842 100644
--- a/libs/surfaceflinger/LayerBase.cpp
+++ b/libs/surfaceflinger/LayerBase.cpp
@@ -202,6 +202,12 @@ uint32_t LayerBase::doTransaction(uint32_t flags)
editTemp.h = temp.requested_h;
}
+ if ((front.w != temp.w) || (front.h != temp.h)) {
+ // invalidate and recompute the visible regions if needed
+ flags |= Layer::eVisibleRegion;
+ this->contentDirty = true;
+ }
+
if (temp.sequence != front.sequence) {
// invalidate and recompute the visible regions if needed
flags |= eVisibleRegion;