diff options
author | Mike Reed <reed@google.com> | 2017-11-15 16:09:04 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-15 21:57:07 +0000 |
commit | 20800c8b1bb7181fc7d3c6af756dc4440094ac90 (patch) | |
tree | d00813dc90b5c8c71969fd7149e76cf17f58c159 | |
parent | d8e3bd77a2250253dad608b1bdba3414f427b1aa (diff) |
rename overloaded methods as speculative fix/diagnostic
Bug:783136
Change-Id: I95df299bd9e1c6263b8e79b23fbe90340bd950e9
Reviewed-on: https://skia-review.googlesource.com/72240
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
-rw-r--r-- | src/core/SkCanvas.cpp | 16 | ||||
-rw-r--r-- | src/core/SkRasterClip.cpp | 26 | ||||
-rw-r--r-- | src/core/SkRasterClip.h | 10 |
3 files changed, 26 insertions, 26 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 445ad058ad..3c719013b3 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1406,8 +1406,8 @@ void SkCanvas::onClipRect(const SkRect& rect, SkClipOp op, ClipEdgeStyle edgeSty FOR_EACH_TOP_DEVICE(device->clipRect(rect, op, isAA)); AutoValidateClip avc(this); - fMCRec->fRasterClip.op(rect, fMCRec->fMatrix, this->getTopLayerBounds(), (SkRegion::Op)op, - isAA); + fMCRec->fRasterClip.opRect(rect, fMCRec->fMatrix, this->getTopLayerBounds(), (SkRegion::Op)op, + isAA); fDeviceClipBounds = qr_clip_bounds(fMCRec->fRasterClip.getBounds()); } @@ -1421,7 +1421,7 @@ void SkCanvas::androidFramework_setDeviceClipRestriction(const SkIRect& rect) { this->checkForDeferredSave(); FOR_EACH_TOP_DEVICE(device->androidFramework_setDeviceClipRestriction(&fClipRestrictionRect)); AutoValidateClip avc(this); - fMCRec->fRasterClip.op(fClipRestrictionRect, SkRegion::kIntersect_Op); + fMCRec->fRasterClip.opIRect(fClipRestrictionRect, SkRegion::kIntersect_Op); fDeviceClipBounds = qr_clip_bounds(fMCRec->fRasterClip.getBounds()); } } @@ -1443,8 +1443,8 @@ void SkCanvas::onClipRRect(const SkRRect& rrect, SkClipOp op, ClipEdgeStyle edge FOR_EACH_TOP_DEVICE(device->clipRRect(rrect, op, isAA)); - fMCRec->fRasterClip.op(rrect, fMCRec->fMatrix, this->getTopLayerBounds(), (SkRegion::Op)op, - isAA); + fMCRec->fRasterClip.opRRect(rrect, fMCRec->fMatrix, this->getTopLayerBounds(), (SkRegion::Op)op, + isAA); fDeviceClipBounds = qr_clip_bounds(fMCRec->fRasterClip.getBounds()); } @@ -1482,8 +1482,8 @@ void SkCanvas::onClipPath(const SkPath& path, SkClipOp op, ClipEdgeStyle edgeSty const SkPath* rasterClipPath = &path; const SkMatrix* matrix = &fMCRec->fMatrix; - fMCRec->fRasterClip.op(*rasterClipPath, *matrix, this->getTopLayerBounds(), (SkRegion::Op)op, - isAA); + fMCRec->fRasterClip.opPath(*rasterClipPath, *matrix, this->getTopLayerBounds(), + (SkRegion::Op)op, isAA); fDeviceClipBounds = qr_clip_bounds(fMCRec->fRasterClip.getBounds()); } @@ -1497,7 +1497,7 @@ void SkCanvas::onClipRegion(const SkRegion& rgn, SkClipOp op) { AutoValidateClip avc(this); - fMCRec->fRasterClip.op(rgn, (SkRegion::Op)op); + fMCRec->fRasterClip.opRegion(rgn, (SkRegion::Op)op); fDeviceClipBounds = qr_clip_bounds(fMCRec->fRasterClip.getBounds()); } diff --git a/src/core/SkRasterClip.cpp b/src/core/SkRasterClip.cpp index b2b0bdcd0b..7738f1a08f 100644 --- a/src/core/SkRasterClip.cpp +++ b/src/core/SkRasterClip.cpp @@ -56,12 +56,12 @@ static MutateResult mutate_conservative_op(SkRegion::Op* op, bool inverseFilled) return kContinue_MutateResult; } } - SK_ABORT("should not get here"); + SkASSERT(false); // unknown op return kDoNothing_MutateResult; } -void SkConservativeClip::op(const SkRect& localRect, const SkMatrix& ctm, const SkIRect& devBounds, - SkRegion::Op op, bool doAA) { +void SkConservativeClip::opRect(const SkRect& localRect, const SkMatrix& ctm, + const SkIRect& devBounds, SkRegion::Op op, bool doAA) { SkIRect ir; switch (mutate_conservative_op(&op, false)) { case kDoNothing_MutateResult: @@ -75,16 +75,16 @@ void SkConservativeClip::op(const SkRect& localRect, const SkMatrix& ctm, const ir = doAA ? devRect.roundOut() : devRect.round(); } break; } - this->op(ir, op); + this->opIRect(ir, op); } -void SkConservativeClip::op(const SkRRect& rrect, const SkMatrix& ctm, const SkIRect& devBounds, - SkRegion::Op op, bool doAA) { - this->op(rrect.getBounds(), ctm, devBounds, op, doAA); +void SkConservativeClip::opRRect(const SkRRect& rrect, const SkMatrix& ctm, + const SkIRect& devBounds, SkRegion::Op op, bool doAA) { + this->opRect(rrect.getBounds(), ctm, devBounds, op, doAA); } -void SkConservativeClip::op(const SkPath& path, const SkMatrix& ctm, const SkIRect& devBounds, - SkRegion::Op op, bool doAA) { +void SkConservativeClip::opPath(const SkPath& path, const SkMatrix& ctm, const SkIRect& devBounds, + SkRegion::Op op, bool doAA) { SkIRect ir; switch (mutate_conservative_op(&op, path.isInverseFillType())) { case kDoNothing_MutateResult: @@ -99,14 +99,14 @@ void SkConservativeClip::op(const SkPath& path, const SkMatrix& ctm, const SkIRe break; } } - return this->op(ir, op); + return this->opIRect(ir, op); } -void SkConservativeClip::op(const SkRegion& rgn, SkRegion::Op op) { - this->op(rgn.getBounds(), op); +void SkConservativeClip::opRegion(const SkRegion& rgn, SkRegion::Op op) { + this->opIRect(rgn.getBounds(), op); } -void SkConservativeClip::op(const SkIRect& devRect, SkRegion::Op op) { +void SkConservativeClip::opIRect(const SkIRect& devRect, SkRegion::Op op) { if (SkRegion::kIntersect_Op == op) { if (!fBounds.intersect(devRect)) { fBounds.setEmpty(); diff --git a/src/core/SkRasterClip.h b/src/core/SkRasterClip.h index 1e50e04539..e7d77ab370 100644 --- a/src/core/SkRasterClip.h +++ b/src/core/SkRasterClip.h @@ -39,11 +39,11 @@ public: fClipRestrictionRect = rect; } - void op(const SkRect&, const SkMatrix&, const SkIRect& limit, SkRegion::Op, bool isAA); - void op(const SkRRect&, const SkMatrix&, const SkIRect& limit, SkRegion::Op, bool isAA); - void op(const SkPath&, const SkMatrix&, const SkIRect& limit, SkRegion::Op, bool isAA); - void op(const SkRegion&, SkRegion::Op); - void op(const SkIRect&, SkRegion::Op); + void opRect(const SkRect&, const SkMatrix&, const SkIRect& limit, SkRegion::Op, bool isAA); + void opRRect(const SkRRect&, const SkMatrix&, const SkIRect& limit, SkRegion::Op, bool isAA); + void opPath(const SkPath&, const SkMatrix&, const SkIRect& limit, SkRegion::Op, bool isAA); + void opRegion(const SkRegion&, SkRegion::Op); + void opIRect(const SkIRect&, SkRegion::Op); }; /** |