diff options
author | Chris Craik <ccraik@google.com> | 2014-08-21 12:26:16 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2014-08-21 13:47:08 -0700 |
commit | 79d26c72aa6f898125df2386054f6a293da4122a (patch) | |
tree | f8d4b0237ce445fe8243457e9de6857fc5a917a8 /libs | |
parent | 3acf66f5580b9e411ff20674c676de0901d4b459 (diff) | |
download | frameworks_base-79d26c72aa6f898125df2386054f6a293da4122a.zip frameworks_base-79d26c72aa6f898125df2386054f6a293da4122a.tar.gz frameworks_base-79d26c72aa6f898125df2386054f6a293da4122a.tar.bz2 |
Enable scissor for rounded outline clips
bug:17164074
Change-Id: I83ca428f4d7651c6774ab81ac390477fb90c5d38
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/StatefulBaseRenderer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/hwui/StatefulBaseRenderer.cpp b/libs/hwui/StatefulBaseRenderer.cpp index 06c5ab4..bdac47b 100644 --- a/libs/hwui/StatefulBaseRenderer.cpp +++ b/libs/hwui/StatefulBaseRenderer.cpp @@ -196,12 +196,14 @@ void StatefulBaseRenderer::setClippingOutline(LinearAllocator& allocator, const float radius; if (!outline->getAsRoundRect(&bounds, &radius)) return; // only RR supported - if (!MathUtils::isPositive(radius)) { + bool outlineIsRounded = MathUtils::isPositive(radius); + if (!outlineIsRounded || currentTransform()->isSimple()) { // TODO: consider storing this rect separately, so that this can't be replaced with clip ops clipRect(bounds.left, bounds.top, bounds.right, bounds.bottom, SkRegion::kIntersect_Op); - return; } - setClippingRoundRect(allocator, bounds, radius); + if (outlineIsRounded) { + setClippingRoundRect(allocator, bounds, radius); + } } void StatefulBaseRenderer::setClippingRoundRect(LinearAllocator& allocator, |