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); |
} |