summaryrefslogtreecommitdiffstats
path: root/libs/hwui/CanvasState.h
diff options
context:
space:
mode:
authorRob Tsuk <robtsuk@google.com>2015-01-06 13:22:54 -0800
committerRob Tsuk <robtsuk@google.com>2015-01-14 17:24:58 -0800
commit487a92caef2eb90a62e8f8d7a6fe6315f1c1d8d8 (patch)
tree6515f9b52f874f5f076a25df83a353de10a3da14 /libs/hwui/CanvasState.h
parent382d6a9ed2360ceb462ea46a60f0f106fdb52540 (diff)
downloadframeworks_base-487a92caef2eb90a62e8f8d7a6fe6315f1c1d8d8.zip
frameworks_base-487a92caef2eb90a62e8f8d7a6fe6315f1c1d8d8.tar.gz
frameworks_base-487a92caef2eb90a62e8f8d7a6fe6315f1c1d8d8.tar.bz2
Clipping performance improvements
Create a ClipArea class to handle tracking clip regions. This class can select the most efficient implementation depending on the types of clipping presented. ClipArea re-used the rectangle and region-based clipping implementations as well as adding a "list of rotated rectangles" approach that is more efficient for rotated views with children. Change-Id: I2133761a2462ebc0852b394220e265974b3086f0
Diffstat (limited to 'libs/hwui/CanvasState.h')
-rw-r--r--libs/hwui/CanvasState.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/libs/hwui/CanvasState.h b/libs/hwui/CanvasState.h
index 9e6a9c3..121112b 100644
--- a/libs/hwui/CanvasState.h
+++ b/libs/hwui/CanvasState.h
@@ -120,10 +120,6 @@ public:
bool clipPath(const SkPath* path, SkRegion::Op op);
bool clipRegion(const SkRegion* region, SkRegion::Op op);
- bool isCurrentClipSimple() const {
- return currentSnapshot()->clipRegion->isEmpty();
- }
-
/**
* Sets a "clipping outline", which is independent from the regular clip.
* Currently only supports rectangles or rounded rectangles; passing in a
@@ -150,7 +146,7 @@ public:
void setInvisible(bool value) { mSnapshot->invisible = value; }
inline const mat4* currentTransform() const { return currentSnapshot()->transform; }
- inline const Rect* currentClipRect() const { return currentSnapshot()->clipRect; }
+ inline const Rect& currentClipRect() const { return currentSnapshot()->getClipRect(); }
inline Region* currentRegion() const { return currentSnapshot()->region; }
inline int currentFlags() const { return currentSnapshot()->flags; }
const Vector3& currentLightCenter() const { return currentSnapshot()->getRelativeLightCenter(); }