Skip to content

Commit 7df03c0

Browse files
committed
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
1 parent 2b1769f commit 7df03c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

services/surfaceflinger/Layer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,12 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
450450
mActiveBuffer = mSurfaceTexture->getCurrentBuffer();
451451
mFrameLatencyNeeded = true;
452452

453+
if (oldActiveBuffer == NULL && mActiveBuffer != NULL) {
454+
// the first time we receive a buffer, we need to trigger a
455+
// geometry invalidation.
456+
mFlinger->invalidateHwcGeometry();
457+
}
458+
453459
const Rect crop(mSurfaceTexture->getCurrentCrop());
454460
const uint32_t transform(mSurfaceTexture->getCurrentTransform());
455461
const uint32_t scalingMode(mSurfaceTexture->getCurrentScalingMode());

0 commit comments

Comments
 (0)