aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClipMaskManager.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-07 21:19:10 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-11-07 21:19:10 +0000
commite8ca6c6e3a55634ac76efe5aceafaf8d669f43ba (patch)
tree5117b031a0d5bb1fc1cd6eb1b6c4de401abca782 /src/gpu/GrClipMaskManager.cpp
parent4f6fba366387c9a19fb982479cdf6ac9e0355118 (diff)
Combine multiple intersecting rects in SkClipStack::Iter.
R=robertphillips@google.com Review URL: https://codereview.appspot.com/6816104 git-svn-id: http://skia.googlecode.com/svn/trunk@6339 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrClipMaskManager.cpp')
-rw-r--r--src/gpu/GrClipMaskManager.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 606b90eeeb..2db006a532 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -88,7 +88,7 @@ bool requires_AA(const SkClipStack& clipIn) {
const SkClipStack::Iter::Clip* clip = NULL;
for (clip = iter.skipToTopmost(SkRegion::kReplace_Op);
NULL != clip;
- clip = iter.next()) {
+ clip = iter.nextCombined()) {
if (clip->fDoAA) {
return true;
@@ -117,13 +117,7 @@ bool GrClipMaskManager::useSWOnlyPath(const SkClipStack& clipIn) {
for (clip = iter.skipToTopmost(SkRegion::kReplace_Op);
NULL != clip;
- clip = iter.next()) {
-
- if (SkRegion::kReplace_Op == clip->fOp) {
- // Everything before a replace op can be ignored so start
- // afresh w.r.t. determining if any element uses the SW path
- useSW = false;
- }
+ clip = iter.nextCombined()) {
// rects can always be drawn directly w/o using the software path
// so only paths need to be checked
@@ -297,7 +291,7 @@ const SkClipStack::Iter::Clip* process_initial_clip_elements(
for (clip = iter->skipToTopmost(SkRegion::kReplace_Op);
NULL != clip && !done;
- clip = iter->next()) {
+ clip = iter->nextCombined()) {
switch (clip->fOp) {
case SkRegion::kReplace_Op:
// replace ignores everything previous
@@ -644,7 +638,7 @@ bool GrClipMaskManager::createAlphaClipMask(const GrClipData& clipDataIn,
GrAutoScratchTexture temp;
bool first = true;
// walk through each clip element and perform its set op
- for ( ; NULL != clip; clip = iter.next()) {
+ for ( ; NULL != clip; clip = iter.nextCombined()) {
SkRegion::Op op = clip->fOp;
if (first) {
@@ -785,7 +779,7 @@ bool GrClipMaskManager::createStencilClipMask(const GrClipData& clipDataIn,
// walk through each clip element and perform its set op
// with the existing clip.
- for ( ; NULL != clip; clip = iter.next()) {
+ for ( ; NULL != clip; clip = iter.nextCombined()) {
GrPathFill fill;
bool fillInverted = false;
// enabled at bottom of loop
@@ -1151,7 +1145,7 @@ bool GrClipMaskManager::createSoftwareClipMask(const GrClipData& clipDataIn,
helper.clear(clearToInside ? 0xFF : 0x00);
bool first = true;
- for ( ; NULL != clip; clip = iter.next()) {
+ for ( ; NULL != clip; clip = iter.nextCombined()) {
SkRegion::Op op = clip->fOp;
if (first) {