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

Unified Diff: skia/ext/benchmarking_canvas.cc

Issue 1537203002: switch to using SaveLayerFlags (SaveFlags are deprecated) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: skia/ext/benchmarking_canvas.cc
diff --git a/skia/ext/benchmarking_canvas.cc b/skia/ext/benchmarking_canvas.cc
index 070167562d62601d37638dba64d03823f3a5c5a1..cb299c7bc43c4a3cf20a2b72c7b5e61e3f50ed93 100644
--- a/skia/ext/benchmarking_canvas.cc
+++ b/skia/ext/benchmarking_canvas.cc
@@ -274,14 +274,12 @@ scoped_ptr<base::Value> AsValue(const SkPaint& paint) {
}
WARN_UNUSED_RESULT
-scoped_ptr<base::Value> AsValue(SkCanvas::SaveFlags flags) {
+scoped_ptr<base::Value> SaveLayerFlagsAsValue(SkCanvas::SaveLayerFlags flags) {
f(malita) 2015/12/19 18:09:14 Bummer, we're breaking the overload-fest :)
FlagsBuilder builder('|');
- builder.addFlag(flags & SkCanvas::kHasAlphaLayer_SaveFlag,
- "kHasAlphaLayer");
- builder.addFlag(flags & SkCanvas::kFullColorLayer_SaveFlag,
- "kFullColorLayer");
- builder.addFlag(flags & SkCanvas::kClipToLayer_SaveFlag,
- "kClipToLayer");
+ builder.addFlag(flags & SkCanvas::kIsOpaque_SaveLayerFlag,
+ "kIsOpaque");
+ builder.addFlag(flags & SkCanvas::kPreserveLCDText_SaveLayerFlag,
+ "kPreserveLCDText");
scoped_ptr<base::StringValue> val(new base::StringValue(builder.str()));
@@ -550,7 +548,7 @@ SkCanvas::SaveLayerStrategy BenchmarkingCanvas::getSaveLayerStrategy(
if (rec.fBounds)
op.addParam("bounds", AsValue(*rec.fBounds));
if (rec.fSaveLayerFlags)
- op.addParam("flags", AsValue(rec.fSaveLayerFlags));
+ op.addParam("flags", SaveLayerFlagsAsValue(rec.fSaveLayerFlags));
return INHERITED::getSaveLayerStrategy(rec);
}
« 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