diff options
author | 2018-12-07 03:01:41 +0000 | |
---|---|---|
committer | 2018-12-07 03:01:41 +0000 | |
commit | d1b8b46e028f4cda74fa14323f0e6714e1401a51 (patch) | |
tree | a3c35a980560fecd4c36cfe75f806bad483c32e8 /services/surfaceflinger/Layer.cpp | |
parent | c4316eba65080fcab7b163124098537d7b2bcd5e (diff) | |
parent | 51625fa3f0663b5f12f0838a619c49a1bfc9533f (diff) |
Merge "Input: Let WM compute touchable region 1/2"
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index d628995276..91be71e390 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -293,8 +293,10 @@ static FloatRect reduce(const FloatRect& win, const Region& exclude) { return Region(Rect{win}).subtract(exclude).getBounds().toFloatRect(); } -Rect Layer::computeScreenBounds() const { - FloatRect bounds = computeBounds(); +Rect Layer::computeScreenBounds(bool reduceTransparentRegion) const { + const State& s(getDrawingState()); + Region transparentRegion = reduceTransparentRegion ? getActiveTransparentRegion(s) : Region(); + FloatRect bounds = computeBounds(transparentRegion); ui::Transform t = getTransform(); // Transform to screen space. bounds = t.transform(bounds); @@ -2155,7 +2157,6 @@ InputWindowInfo Layer::fillInputInfo(const Rect& screenBounds) { // Position the touchable region relative to frame screen location and restrict it to frame // bounds. info.touchableRegion = info.touchableRegion.translate(info.frameLeft, info.frameTop); - info.touchableRegion = info.touchableRegion.intersect(frame); info.visible = isVisible(); return info; } |