diff options
| author | 2015-01-06 13:22:54 -0800 | |
|---|---|---|
| committer | 2015-01-14 17:24:58 -0800 | |
| commit | 487a92caef2eb90a62e8f8d7a6fe6315f1c1d8d8 (patch) | |
| tree | 6515f9b52f874f5f076a25df83a353de10a3da14 /libs/hwui/OpenGLRenderer.h | |
| parent | 382d6a9ed2360ceb462ea46a60f0f106fdb52540 (diff) | |
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/OpenGLRenderer.h')
| -rwxr-xr-x | libs/hwui/OpenGLRenderer.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index 9d9b3d25dcd8..f6131831b152 100755 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -223,9 +223,6 @@ public: return mCaches; } - // simple rect clip - bool isCurrentClipSimple() { return mState.isCurrentClipSimple(); } - int getViewportWidth() { return mState.getViewportWidth(); } int getViewportHeight() { return mState.getViewportHeight(); } @@ -433,6 +430,13 @@ protected: */ void attachStencilBufferToLayer(Layer* layer); + /** + * Draw a rectangle list. Currently only used for the the stencil buffer so that the stencil + * will have a value of 'n' in every unclipped pixel, where 'n' is the number of rectangles + * in the list. + */ + void drawRectangleList(const RectangleList& rectangleList); + bool quickRejectSetupScissor(float left, float top, float right, float bottom, const SkPaint* paint = nullptr); bool quickRejectSetupScissor(const Rect& bounds, const SkPaint* paint = nullptr) { |