Added isIntersectionOfRects to SkClipStack
http://codereview.appspot.com/6434050/
git-svn-id: http://skia.googlecode.com/svn/trunk@4745 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index c92af64..57d9fbd 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -409,14 +409,19 @@
#endif
SkRect bounds;
+ bool isIntersectionOfRects = false;
clipStack.getConservativeBounds(-origin.fX,
-origin.fY,
renderTargetWidth,
renderTargetHeight,
- &bounds);
+ &bounds,
+ &isIntersectionOfRects);
GrClip grc(&iter, GrIntToScalar(-origin.x()), GrIntToScalar(-origin.y()),
bounds);
+
+ GrAssert(grc.isRect() == isIntersectionOfRects);
+
context->setClip(grc);
}