pass the region-op to the clipstack for SkCanvas::clipRegion.

we were defaulting to intersect all the time (doh).



git-svn-id: http://skia.googlecode.com/svn/trunk@3980 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2012-05-16 18:50:40 +00:00
parent 20a0477009
commit 115d931d2f
2 changed files with 2 additions and 3 deletions

View File

@ -30,8 +30,7 @@ public:
void save(); void save();
void restore(); void restore();
void clipDevRect(const SkIRect& ir, void clipDevRect(const SkIRect& ir, SkRegion::Op op) {
SkRegion::Op op = SkRegion::kIntersect_Op) {
SkRect r; SkRect r;
r.set(ir); r.set(ir);
this->clipDevRect(r, op, false); this->clipDevRect(r, op, false);

View File

@ -1194,7 +1194,7 @@ bool SkCanvas::clipRegion(const SkRegion& rgn, SkRegion::Op op) {
// todo: signal fClipStack that we have a region, and therefore (I guess) // todo: signal fClipStack that we have a region, and therefore (I guess)
// we have to ignore it, and use the region directly? // we have to ignore it, and use the region directly?
fClipStack.clipDevRect(rgn.getBounds()); fClipStack.clipDevRect(rgn.getBounds(), op);
return fMCRec->fRasterClip->op(rgn, op); return fMCRec->fRasterClip->op(rgn, op);
} }