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
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index c15fdbc..e96cf32 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -450,6 +450,12 @@
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());