diff --git a/gpu/src/GrClip.cpp b/gpu/src/GrClip.cpp index 7ccec261a1..ade8c2b971 100644 --- a/gpu/src/GrClip.cpp +++ b/gpu/src/GrClip.cpp @@ -138,13 +138,9 @@ void GrClip::setFromIterator(GrClipIterator* iter, GrScalar tx, GrScalar ty, } } 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 65f34ccce8..3bb193bd13 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -528,7 +528,6 @@ SkDevice* SkCanvas::setDevice(SkDevice* device) { 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 @@ private: 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 e72a6b7603..8cf1eca3b8 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -517,7 +517,6 @@ SkPDFDevice::SkPDFDevice(const SkISize& pageSize, const SkISize& contentSize, fInitialTransform.preConcat(initialTransform); SkIRect existingClip = SkIRect::MakeWH(this->width(), this->height()); - fExistingClipStack.clipDevRect(existingClip); fExistingClipRegion.setRect(existingClip); this->init();