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
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index e936188..6bc80ee 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -541,6 +541,7 @@
mCurrentTransform = transform;
mCurrentScalingMode = scalingMode;
mFlinger->invalidateHwcGeometry();
+ recomputeVisibleRegions = true;
}
uint32_t bufWidth = mActiveBuffer->getWidth();
@@ -549,6 +550,7 @@
if (bufWidth != uint32_t(oldActiveBuffer->width) ||
bufHeight != uint32_t(oldActiveBuffer->height)) {
mFlinger->invalidateHwcGeometry();
+ recomputeVisibleRegions = true;
}
}