Remove SkRasterClip::setPath(const SkPath&, const SkRasterClip&, bool).

The method is only used in SkCanvas::clipPathHelper() and only called when isRect() is true (which effectively disables the !isBW branch).

Thus, we can promote the isBW branch to the caller and drop the rest of the method.

R=reed@google.com

Author: fmalita@chromium.org

Review URL: https://chromiumcodereview.appspot.com/18552004

git-svn-id: http://skia.googlecode.com/svn/trunk@9974 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2013-07-10 20:55:39 +00:00
parent e81d1bce7e
commit b446fc7f05
3 changed files with 4 additions and 16 deletions

View File

@ -1144,7 +1144,10 @@ static bool clipPathHelper(const SkCanvas* canvas, SkRasterClip* currClip,
// bounds, than just using the device. However, if currRgn is complex,
// our region blitter may hork, so we do that case in two steps.
if (currClip->isRect()) {
return currClip->setPath(devPath, *currClip, doAA);
// FIXME: we should also be able to do this when currClip->isBW(),
// but relaxing the test above triggers GM asserts in
// SkRgnBuilder::blitH(). We need to investigate what's going on.
return currClip->setPath(devPath, currClip->bwRgn(), doAA);
} else {
base.setRect(currClip->getBounds());
SkRasterClip clip;

View File

@ -92,20 +92,6 @@ bool SkRasterClip::setPath(const SkPath& path, const SkIRect& clip, bool doAA) {
return this->setPath(path, tmp, doAA);
}
bool SkRasterClip::setPath(const SkPath& path, const SkRasterClip& clip,
bool doAA) {
if (clip.isBW()) {
return this->setPath(path, clip.bwRgn(), doAA);
} else {
SkRegion tmp;
tmp.setRect(clip.getBounds());
if (!this->setPath(path, clip, doAA)) {
return false;
}
return this->op(clip, SkRegion::kIntersect_Op);
}
}
bool SkRasterClip::op(const SkIRect& rect, SkRegion::Op op) {
AUTO_RASTERCLIP_VALIDATE(*this);

View File

@ -41,7 +41,6 @@ public:
bool setPath(const SkPath& path, const SkRegion& clip, bool doAA);
bool setPath(const SkPath& path, const SkIRect& clip, bool doAA);
bool setPath(const SkPath& path, const SkRasterClip&, bool doAA);
bool op(const SkIRect&, SkRegion::Op);
bool op(const SkRegion&, SkRegion::Op);