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
diff --git a/gpu/include/GrClip.h b/gpu/include/GrClip.h
index 7de6c10..ba6eb44 100644
--- a/gpu/include/GrClip.h
+++ b/gpu/include/GrClip.h
@@ -61,7 +61,9 @@
GrSetOp getOp(int i) const { return fList[i].fOp; }
bool isRect() const {
- if (1 == fList.count() && kRect_ClipType == fList[0].fType) {
+ if (1 == fList.count() && kRect_ClipType == fList[0].fType &&
+ (kIntersect_SetOp == fList[0].fOp ||
+ kReplace_SetOp == fList[0].fOp)) {
// if we determined that the clip is a single rect
// we ought to have also used that rect as the bounds.
GrAssert(fConservativeBoundsValid);