From 51dcd581b1fb1bcea7cac9b969123abda13e34ab Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Thu, 10 May 2012 14:37:14 -0700 Subject: [PATCH] SurfaceFlinger: recompute visible regions more This change makes a change in the crop, scaling mode, transform, or buffer dimensions trigger a recomputation of the visible regions of a window. With the new cropping behavior for SCALING_MODE_FREEZE all of these can now affect the visible region. Bug: 6470541 Change-Id: I1904e47efbd708e28bf189f637d24dbef65cd41e --- services/surfaceflinger/Layer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index e93618859..6bc80eea9 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -541,6 +541,7 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) mCurrentTransform = transform; mCurrentScalingMode = scalingMode; mFlinger->invalidateHwcGeometry(); + recomputeVisibleRegions = true; } uint32_t bufWidth = mActiveBuffer->getWidth(); @@ -549,6 +550,7 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions) if (bufWidth != uint32_t(oldActiveBuffer->width) || bufHeight != uint32_t(oldActiveBuffer->height)) { mFlinger->invalidateHwcGeometry(); + recomputeVisibleRegions = true; } }