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
This commit is contained in:
parent
fafe599284
commit
3a9eaeccb0
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user