move patheffect virtuals to protected and rename
- change filterPath to safely handle if src and dst are aliases
Bug: skia:8254
Change-Id: I125d19404ca0a610f73271abb5c5455d1d50f9ed
Reviewed-on: https://skia-review.googlesource.com/147466
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Mike Reed <reed@google.com>
diff --git a/src/effects/Sk2DPathEffect.cpp b/src/effects/Sk2DPathEffect.cpp
index 6c2c4c2..2458682 100644
--- a/src/effects/Sk2DPathEffect.cpp
+++ b/src/effects/Sk2DPathEffect.cpp
@@ -18,8 +18,8 @@
fMatrixIsInvertible = fMatrix.invert(&fInverse);
}
-bool Sk2DPathEffect::filterPath(SkPath* dst, const SkPath& src,
- SkStrokeRec*, const SkRect*) const {
+bool Sk2DPathEffect::onFilterPath(SkPath* dst, const SkPath& src,
+ SkStrokeRec*, const SkRect*) const {
if (!fMatrixIsInvertible) {
return false;
}
@@ -76,8 +76,8 @@
///////////////////////////////////////////////////////////////////////////////
-bool SkLine2DPathEffect::filterPath(SkPath* dst, const SkPath& src,
- SkStrokeRec* rec, const SkRect* cullRect) const {
+bool SkLine2DPathEffect::onFilterPath(SkPath* dst, const SkPath& src,
+ SkStrokeRec* rec, const SkRect* cullRect) const {
if (this->INHERITED::filterPath(dst, src, rec, cullRect)) {
rec->setStrokeStyle(fWidth);
return true;