diff options
| author | 2017-06-01 16:11:34 -0700 | |
|---|---|---|
| committer | 2017-06-02 11:31:29 -0700 | |
| commit | 41b08b5e97b04d726fb8bbacddbce563a1c890f9 (patch) | |
| tree | 293f2472991be470b294e94e05cc7a068e8388b1 /services/surfaceflinger/Layer.cpp | |
| parent | 98b0fd5fc28b07b6b488bc599a3448ebcacb6acc (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.cpp | 4 |
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, |