Don't intersect clipstack with root device bounds

Review URL: Don't intersect clipstack with root device bounds



git-svn-id: http://skia.googlecode.com/svn/trunk@2175 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrClip.cpp b/gpu/src/GrClip.cpp
index 7ccec26..ade8c2b 100644
--- a/gpu/src/GrClip.cpp
+++ b/gpu/src/GrClip.cpp
@@ -138,13 +138,9 @@
         }
     }
     fConservativeBoundsValid = false;
-    if (isectRectValid) {
+    if (isectRectValid && rectCount) {
+        fConservativeBounds = fList[0].fRect;
         fConservativeBoundsValid = true;
-        if (rectCount > 0) {
-            fConservativeBounds = fList[0].fRect;
-        } else {
-            fConservativeBounds.setEmpty();
-        }
     } else if (NULL != conservativeBounds) {
         fConservativeBounds = *conservativeBounds;
         fConservativeBoundsValid = true;
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 65f34cc..3bb193b 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -528,7 +528,6 @@
         while ((rec = (MCRec*)iter.next()) != NULL) {
             (void)rec->fRegion->op(bounds, SkRegion::kIntersect_Op);
         }
-        fClipStack.clipDevRect(bounds, SkRegion::kIntersect_Op);
     }
     return device;
 }
@@ -1384,11 +1383,11 @@
 
 void SkCanvas::DrawRect(const SkDraw& draw, const SkPaint& paint,
                         const SkRect& r, SkScalar textSize) {
-    if (paint.getStyle() == SkPaint::kFill_Style) {

+    if (paint.getStyle() == SkPaint::kFill_Style) {
         draw.fDevice->drawRect(draw, r, paint);
     } else {
         SkPaint p(paint);
-        p.setStrokeWidth(SkScalarMul(textSize, paint.getStrokeWidth()));

+        p.setStrokeWidth(SkScalarMul(textSize, paint.getStrokeWidth()));
         draw.fDevice->drawRect(draw, r, p);
     }
 }
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index e72a6b7..8cf1eca 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -517,7 +517,6 @@
     fInitialTransform.preConcat(initialTransform);
 
     SkIRect existingClip = SkIRect::MakeWH(this->width(), this->height());
-    fExistingClipStack.clipDevRect(existingClip);
     fExistingClipRegion.setRect(existingClip);
 
     this->init();