diff options
author | Mathias Agopian <mathias@google.com> | 2013-05-10 18:01:12 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-05-10 18:35:43 -0700 |
commit | f3e85d432749ca77ad707bec523b67d741d43e6e (patch) | |
tree | 4955c1f1bb5c9600b2c276c26b82efac7ddc776a /include/ui | |
parent | 6c7f25afb75ac155bad0b3bc17c0089d0337d060 (diff) | |
download | frameworks_native-f3e85d432749ca77ad707bec523b67d741d43e6e.zip frameworks_native-f3e85d432749ca77ad707bec523b67d741d43e6e.tar.gz frameworks_native-f3e85d432749ca77ad707bec523b67d741d43e6e.tar.bz2 |
take the "transparent region" into account for blending
until now it was only used to discard a layer entirely.
we're now reducing the size of the layer if it is still
visible, if possible.
this works for instance when a surfaceView is used and
only the menu bar is displayed over it.
Change-Id: I3f5527c5cd1e69ecc968272c8948f1513ada8c55
Diffstat (limited to 'include/ui')
-rw-r--r-- | include/ui/Rect.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/ui/Rect.h b/include/ui/Rect.h index 9169287..6cf64eb 100644 --- a/include/ui/Rect.h +++ b/include/ui/Rect.h @@ -160,6 +160,10 @@ public: // the input. Rect transform(uint32_t xform, int32_t width, int32_t height) const; + // this calculates (Region(*this) - exclude).bounds() efficiently + Rect reduce(const Rect& exclude) const; + + // for backward compatibility inline int32_t width() const { return getWidth(); } inline int32_t height() const { return getHeight(); } |