diff options
author | 2011-08-29 15:18:41 +0000 | |
---|---|---|
committer | 2011-08-29 15:18:41 +0000 | |
commit | ab3dee5c8a7b782f2cf2464316867f2efb2a5cf3 (patch) | |
tree | 6d82028c569417e478b625a62861b4764e37d9e8 /gpu/src/GrClip.cpp | |
parent | 5b86a379e97bad944221e6dcc26878701d726148 (diff) |
Fix GPU assumption that clipstack begins with intersect or replace.
Review URL: http://codereview.appspot.com/4977043/
git-svn-id: http://skia.googlecode.com/svn/trunk@2183 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src/GrClip.cpp')
-rw-r--r-- | gpu/src/GrClip.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gpu/src/GrClip.cpp b/gpu/src/GrClip.cpp index ade8c2b971..afa143a95b 100644 --- a/gpu/src/GrClip.cpp +++ b/gpu/src/GrClip.cpp @@ -61,6 +61,7 @@ void GrClip::setFromRect(const GrRect& r) { fList.push_back(); fList.back().fRect = r; fList.back().fType = kRect_ClipType; + fList.back().fOp = kReplace_SetOp; fConservativeBounds = r; fConservativeBoundsValid = true; } @@ -75,6 +76,7 @@ void GrClip::setFromIRect(const GrIRect& r) { fList.push_back(); fList.back().fRect.set(r); fList.back().fType = kRect_ClipType; + fList.back().fOp = kReplace_SetOp; fConservativeBounds.set(r); fConservativeBoundsValid = true; } @@ -110,7 +112,7 @@ void GrClip::setFromIterator(GrClipIterator* iter, GrScalar tx, GrScalar ty, } ++rectCount; if (isectRectValid) { - if (1 == rectCount || kIntersect_SetOp == e.fOp) { + if (kIntersect_SetOp == e.fOp) { GrAssert(fList.count() <= 2); if (fList.count() > 1) { GrAssert(2 == rectCount); |