From ab10c5804c250e7f392c8262f687766edec2e9f4 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 26 Sep 2012 16:19:12 -0700 Subject: [PATCH] Recompute visible regions more vigorously Some of the code in latchBuffer was calling invalidateHwcGeometry, but that didn't cause the SurfaceFlinger visible region code to re-evaluate the layer's visibility. Set the recomputeVisibleRegions "out" parameter instead. Bug 7235797 Change-Id: If6ba33fbd1a594cd64cc5253aebf752d6ceda1c9 --- services/surfaceflinger/Layer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 41c496391..c2da23888 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -655,7 +655,7 @@ Region Layer::latchBuffer(bool& recomputeVisibleRegions) if (oldActiveBuffer == NULL) { // the first time we receive a buffer, we need to trigger a // geometry invalidation. - mFlinger->invalidateHwcGeometry(); + recomputeVisibleRegions = true; } Rect crop(mSurfaceTexture->getCurrentCrop()); @@ -668,7 +668,7 @@ Region Layer::latchBuffer(bool& recomputeVisibleRegions) mCurrentCrop = crop; mCurrentTransform = transform; mCurrentScalingMode = scalingMode; - mFlinger->invalidateHwcGeometry(); + recomputeVisibleRegions = true; } if (oldActiveBuffer != NULL) { @@ -676,7 +676,7 @@ Region Layer::latchBuffer(bool& recomputeVisibleRegions) uint32_t bufHeight = mActiveBuffer->getHeight(); if (bufWidth != uint32_t(oldActiveBuffer->width) || bufHeight != uint32_t(oldActiveBuffer->height)) { - mFlinger->invalidateHwcGeometry(); + recomputeVisibleRegions = true; } }