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:
bsalomon@google.com 2011-08-25 21:12:57 +00:00
parent fafe599284
commit 3a9eaeccb0
3 changed files with 4 additions and 10 deletions

View File

@ -138,13 +138,9 @@ void GrClip::setFromIterator(GrClipIterator* iter, GrScalar tx, GrScalar ty,
} }
} }
fConservativeBoundsValid = false; fConservativeBoundsValid = false;
if (isectRectValid) { if (isectRectValid && rectCount) {
fConservativeBoundsValid = true;
if (rectCount > 0) {
fConservativeBounds = fList[0].fRect; fConservativeBounds = fList[0].fRect;
} else { fConservativeBoundsValid = true;
fConservativeBounds.setEmpty();
}
} else if (NULL != conservativeBounds) { } else if (NULL != conservativeBounds) {
fConservativeBounds = *conservativeBounds; fConservativeBounds = *conservativeBounds;
fConservativeBoundsValid = true; fConservativeBoundsValid = true;

View File

@ -528,7 +528,6 @@ SkDevice* SkCanvas::setDevice(SkDevice* device) {
while ((rec = (MCRec*)iter.next()) != NULL) { while ((rec = (MCRec*)iter.next()) != NULL) {
(void)rec->fRegion->op(bounds, SkRegion::kIntersect_Op); (void)rec->fRegion->op(bounds, SkRegion::kIntersect_Op);
} }
fClipStack.clipDevRect(bounds, SkRegion::kIntersect_Op);
} }
return device; return device;
} }

View File

@ -517,7 +517,6 @@ SkPDFDevice::SkPDFDevice(const SkISize& pageSize, const SkISize& contentSize,
fInitialTransform.preConcat(initialTransform); fInitialTransform.preConcat(initialTransform);
SkIRect existingClip = SkIRect::MakeWH(this->width(), this->height()); SkIRect existingClip = SkIRect::MakeWH(this->width(), this->height());
fExistingClipStack.clipDevRect(existingClip);
fExistingClipRegion.setRect(existingClip); fExistingClipRegion.setRect(existingClip);
this->init(); this->init();