bool SkRasterClip::op(const SkRegion& rgn, SkRegion::Op op) { if (fIsBW) { return fBW.op(rgn, op); } else { SkAAClip tmp; tmp.setRegion(rgn); return fAA.op(tmp, op); } }
bool SkRasterClip::op(const SkRegion& rgn, SkRegion::Op op) { AUTO_RASTERCLIP_VALIDATE(*this); if (fIsBW) { return fBW.op(rgn, op); } else { SkAAClip tmp; tmp.setRegion(rgn); return fAA.op(tmp, op); } }
bool SkRasterClip::op(const SkRegion& rgn, SkRegion::Op op) { AUTO_RASTERCLIP_VALIDATE(*this); if (fIsBW) { (void)fBW.op(rgn, op); } else { SkAAClip tmp; tmp.setRegion(rgn); (void)fAA.op(tmp, op); } return this->updateCacheAndReturnNonEmpty(); }
bool SkRasterClip::op(const SkRasterClip& clip, SkRegion::Op op) { if (this->isBW() && clip.isBW()) { return fBW.op(clip.fBW, op); } else { SkAAClip tmp; const SkAAClip* other; if (this->isBW()) { this->convertToAA(); } if (clip.isBW()) { tmp.setRegion(clip.bwRgn()); other = &tmp; } else { other = &clip.aaRgn(); } return fAA.op(*other, op); } }
bool SkRasterClip::op(const SkRasterClip& clip, SkRegion::Op op) { AUTO_RASTERCLIP_VALIDATE(*this); clip.validate(); if (this->isBW() && clip.isBW()) { return fBW.op(clip.fBW, op); } else { SkAAClip tmp; const SkAAClip* other; if (this->isBW()) { this->convertToAA(); } if (clip.isBW()) { tmp.setRegion(clip.bwRgn()); other = &tmp; } else { other = &clip.aaRgn(); } return fAA.op(*other, op); } }
static bool equalsAAClip(const SkRegion& rgn) { SkAAClip aaclip; aaclip.setRegion(rgn); return rgn == aaclip; }
virtual void onDraw(SkCanvas* canvas) { for (int i = 0; i < N; ++i) { SkAAClip clip; clip.setRegion(fRegion); } }
virtual void onDraw(int loops, SkCanvas*) { for (int i = 0; i < loops; ++i) { SkAAClip clip; clip.setRegion(fRegion); } }