summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2012-02-27 16:58:04 -0800
committer Mathias Agopian <mathias@google.com> 2012-02-27 16:58:04 -0800
commit7df03c067d63adb183e6fa488f946047f7e76843 (patch)
tree9a400a2d7264230c9833a7cdf92f35ea186580f4
parent2b1769fe26de5d1d7aa34e3c133dedc17341d82d (diff)
a window could get stuck to gpu composition
this could happen after an orientation change. basically we need to triger a geometry-changed when the very first buffer is received Change-Id: I097e411fd6612c18725737cffccdbf6b2af3511c
-rw-r--r--services/surfaceflinger/Layer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index c15fdbc1ecef..e96cf3263447 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -450,6 +450,12 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
mActiveBuffer = mSurfaceTexture->getCurrentBuffer();
mFrameLatencyNeeded = true;
+ if (oldActiveBuffer == NULL && mActiveBuffer != NULL) {
+ // the first time we receive a buffer, we need to trigger a
+ // geometry invalidation.
+ mFlinger->invalidateHwcGeometry();
+ }
+
const Rect crop(mSurfaceTexture->getCurrentCrop());
const uint32_t transform(mSurfaceTexture->getCurrentTransform());
const uint32_t scalingMode(mSurfaceTexture->getCurrentScalingMode());