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

Unified Diff: src/core/SkRecordDraw.cpp

Issue 1824983003: SkRecord: infer return type for visit() and mutate(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « src/core/SkRecord.cpp ('k') | src/core/SkRecordPattern.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecordDraw.cpp
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 0e4b5af580bf005fe8f3187bdbb718f7bd716beb..394cc72026a1b6735f4cad7cca69e0861284170f 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -40,7 +40,7 @@ void SkRecordDraw(const SkRecord& record,
// This visit call uses the SkRecords::Draw::operator() to call
// methods on the |canvas|, wrapped by methods defined with the
// DRAW() macro.
- record.visit<void>(ops[i], draw);
+ record.visit(ops[i], draw);
}
} else {
// Draw all ops.
@@ -52,7 +52,7 @@ void SkRecordDraw(const SkRecord& record,
// This visit call uses the SkRecords::Draw::operator() to call
// methods on the |canvas|, wrapped by methods defined with the
// DRAW() macro.
- record.visit<void>(i, draw);
+ record.visit(i, draw);
}
}
}
@@ -66,7 +66,7 @@ void SkRecordPartialDraw(const SkRecord& record, SkCanvas* canvas,
stop = SkTMin(stop, record.count());
SkRecords::Draw draw(canvas, drawablePicts, nullptr, drawableCount, &initialCTM);
for (int i = start; i < stop; i++) {
- record.visit<void>(i, draw);
+ record.visit(i, draw);
}
}
@@ -521,7 +521,7 @@ private:
Bounds bounds(const DrawAnnotation& op) const {
return this->adjustAndMap(op.rect, nullptr);
}
-
+
static void AdjustTextForFontMetrics(SkRect* rect, const SkPaint& paint) {
#ifdef SK_DEBUG
SkRect correct = *rect;
@@ -797,7 +797,7 @@ void SkRecordFillBounds(const SkRect& cullRect, const SkRecord& record, SkRect b
SkRecords::FillBounds visitor(cullRect, record, bounds);
for (int curOp = 0; curOp < record.count(); curOp++) {
visitor.setCurrentOp(curOp);
- record.visit<void>(curOp, visitor);
+ record.visit(curOp, visitor);
}
visitor.cleanUp();
}
@@ -807,7 +807,7 @@ void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record, SkRec
SkRecords::CollectLayers visitor(cullRect, record, bounds, pictList, data);
for (int curOp = 0; curOp < record.count(); curOp++) {
visitor.setCurrentOp(curOp);
- record.visit<void>(curOp, visitor);
+ record.visit(curOp, visitor);
}
visitor.cleanUp();
}
« no previous file with comments | « src/core/SkRecord.cpp ('k') | src/core/SkRecordPattern.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698