Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: src/core/SkCanvas.cpp

Issue 999593002: remove unused params to DeviceCM constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index a47bd89c0507acad23ca7512279813ddd4a8697f..e4c03f3e5e0857464e52a43be2fa1518854d6e25 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -114,7 +114,7 @@ struct DeviceCM {
const SkMatrix* fMatrix;
SkPaint* fPaint; // may be null (in the future)
- DeviceCM(SkBaseDevice* device, int x, int y, const SkPaint* paint, SkCanvas* canvas,
+ DeviceCM(SkBaseDevice* device, const SkPaint* paint, SkCanvas* canvas,
bool conservativeRasterClip)
: fNext(NULL)
, fClip(conservativeRasterClip)
@@ -438,7 +438,7 @@ SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) {
fMCRec = (MCRec*)fMCStack.push_back();
new (fMCRec) MCRec(fConservativeRasterClip);
- fMCRec->fLayer = SkNEW_ARGS(DeviceCM, (NULL, 0, 0, NULL, NULL, fConservativeRasterClip));
+ fMCRec->fLayer = SkNEW_ARGS(DeviceCM, (NULL, NULL, NULL, fConservativeRasterClip));
fMCRec->fTopLayer = fMCRec->fLayer;
fSurfaceBase = NULL;
@@ -838,8 +838,10 @@ bool SkCanvas::clipRectBounds(const SkRect* bounds, SaveFlags flags,
return false;
}
+ const SkMatrix& ctm = fMCRec->fMatrix; // this->getTotalMatrix()
+
if (imageFilter) {
- imageFilter->filterBounds(clipBounds, fMCRec->fMatrix, &clipBounds);
+ imageFilter->filterBounds(clipBounds, ctm, &clipBounds);
// Filters may grow the bounds beyond the device bounds.
op = SkRegion::kReplace_Op;
}
@@ -847,7 +849,7 @@ bool SkCanvas::clipRectBounds(const SkRect* bounds, SaveFlags flags,
if (bounds) {
SkRect r;
- this->getTotalMatrix().mapRect(&r, *bounds);
+ ctm.mapRect(&r, *bounds);
r.roundOut(&ir);
// early exit if the layer's bounds are clipped out
if (!ir.intersect(clipBounds)) {
@@ -954,8 +956,7 @@ void SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, Sav
}
device->setOrigin(ir.fLeft, ir.fTop);
- DeviceCM* layer = SkNEW_ARGS(DeviceCM,
- (device, ir.fLeft, ir.fTop, paint, this, fConservativeRasterClip));
+ DeviceCM* layer = SkNEW_ARGS(DeviceCM, (device, paint, this, fConservativeRasterClip));
device->unref();
layer->fNext = fMCRec->fTopLayer;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698