diff options
Diffstat (limited to 'libs/hwui/Snapshot.h')
| -rw-r--r-- | libs/hwui/Snapshot.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/libs/hwui/Snapshot.h b/libs/hwui/Snapshot.h index c94af7e..b2bc879 100644 --- a/libs/hwui/Snapshot.h +++ b/libs/hwui/Snapshot.h @@ -181,7 +181,7 @@ public: mat4* transform; /** - * Current clip region. The clip is stored in canvas-space coordinates, + * Current clip rect. The clip is stored in canvas-space coordinates, * (screen-space coordinates in the regular case.) * * This is a reference to a rect owned by this snapshot or another @@ -190,6 +190,17 @@ public: Rect* clipRect; /** + * Current clip region. The clip is stored in canvas-space coordinates, + * (screen-space coordinates in the regular case.) + * + * This is a reference to a region owned by this snapshot or another + * snapshot. This pointer must not be freed. See ::mClipRegionRoot. + * + * This field is used only if STENCIL_BUFFER_SIZE is > 0. + */ + Region* clipRegion; + + /** * The ancestor layer's dirty region. * * This is a reference to a region owned by a layer. This pointer must @@ -198,10 +209,22 @@ public: Region* region; private: + void ensureClipRegion(); + void copyClipRectFromRegion(); + + bool clipRegionOr(float left, float top, float right, float bottom); + bool clipRegionXor(float left, float top, float right, float bottom); + bool clipRegionAnd(float left, float top, float right, float bottom); + bool clipRegionNand(float left, float top, float right, float bottom); + mat4 mTransformRoot; Rect mClipRectRoot; Rect mLocalClip; +#if STENCIL_BUFFER_SIZE + Region mClipRegionRoot; +#endif + }; // class Snapshot }; // namespace uirenderer |
