diff options
author | 2014-09-03 17:52:24 -0700 | |
---|---|---|
committer | 2014-09-04 14:05:10 -0700 | |
commit | e83cbd451868a734bfac07ccd680d5617080b579 (patch) | |
tree | eb2c39e190850694b67ad3f6e810a08f63e60282 /libs/hwui/Snapshot.cpp | |
parent | 01abcaa295fc4eec7442a575d160b0ce2c250127 (diff) |
Prioritize reveal clipping over Outline clipping
bug:15780987
bug:17350602
Also update docs around clipping nesting behavior,
and some Z ordering behavior.
Change-Id: Iaa204350a0adfdcbd8c4b821fb4a9c0ae22f2613
Diffstat (limited to 'libs/hwui/Snapshot.cpp')
-rw-r--r-- | libs/hwui/Snapshot.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/hwui/Snapshot.cpp b/libs/hwui/Snapshot.cpp index ecc47d29a647..cf8229fdffb9 100644 --- a/libs/hwui/Snapshot.cpp +++ b/libs/hwui/Snapshot.cpp @@ -216,14 +216,22 @@ void Snapshot::resetTransform(float x, float y, float z) { // Clipping round rect /////////////////////////////////////////////////////////////////////////////// -void Snapshot::setClippingRoundRect(LinearAllocator& allocator, const Rect& bounds, float radius) { +void Snapshot::setClippingRoundRect(LinearAllocator& allocator, const Rect& bounds, + float radius, bool highPriority) { if (bounds.isEmpty()) { clipRect->setEmpty(); return; } + if (roundRectClipState && roundRectClipState->highPriority) { + // ignore, don't replace, already have a high priority clip + return; + } + RoundRectClipState* state = new (allocator) RoundRectClipState; + state->highPriority = highPriority; + // store the inverse drawing matrix Matrix4 roundRectDrawingMatrix; roundRectDrawingMatrix.load(getOrthoMatrix()); |