summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2017-06-01 16:11:34 -0700
committer Robert Carr <racarr@google.com> 2017-06-02 11:31:29 -0700
commit41b08b5e97b04d726fb8bbacddbce563a1c890f9 (patch)
tree293f2472991be470b294e94e05cc7a068e8388b1 /services/surfaceflinger/Layer.cpp
parent98b0fd5fc28b07b6b488bc599a3448ebcacb6acc (diff)
SurfaceFlinger: Fix final cropping of child layers.
Straightforward mistake documented by the test case. Not sure how it made it this long. Test: Included in Transaction_test.cpp. Manual from bug. go/wm-smoke. Bug: 37511473 Change-Id: I87a57825cca879c5519fe72fef199168f7c23479
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index c21f0c26a1..6f430a386f 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -399,6 +399,10 @@ Rect Layer::computeScreenBounds(bool reduceTransparentRegion) const {
Transform t = getTransform();
win = t.transform(win);
+ if (!s.finalCrop.isEmpty()) {
+ win.intersect(s.finalCrop, &win);
+ }
+
const sp<Layer>& p = getParent();
// Now we need to calculate the parent bounds, so we can clip ourselves to those.
// When calculating the parent bounds for purposes of clipping,