From 2ca79399b933935eb1b6c0ec1f746f8c4475369c Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 2 Apr 2013 18:30:32 -0700 Subject: latch transparent region hint only when we get a new frame since the transparent region hint really depends on the content of the window containing the SurfaceView (it's calculated by the view hierarchy based on overlapping views), it makes sense to latch it only when the content of the window (the app) changes. This should help fixing drawing artifacts when changing the layout of a window containing a SurfaceView. Bug: 8511430 Change-Id: Ic3aa668495293cb4d82a2cd7dcf3b6a337287678 --- libs/ui/Region.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs/ui/Region.cpp') diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp index 488fba32cf..bf01488ca2 100644 --- a/libs/ui/Region.cpp +++ b/libs/ui/Region.cpp @@ -239,6 +239,10 @@ void Region::set(uint32_t w, uint32_t h) mStorage.add(Rect(w,h)); } +bool Region::isTriviallyEqual(const Region& region) const { + return begin() == region.begin(); +} + // ---------------------------------------------------------------------------- void Region::addRectUnchecked(int l, int t, int r, int b) -- cgit v1.2.3-59-g8ed1b