From ec923ee0d0e6f95bd56275214c252cb57bb8cfd4 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 27 Feb 2012 16:58:04 -0800 Subject: [PATCH] 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 --- services/surfaceflinger/Layer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index c15fdbc1e..e96cf3263 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());