OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
8 #include "skia/ext/benchmarking_canvas.h" | 8 #include "skia/ext/benchmarking_canvas.h" |
9 #include "third_party/skia/include/core/SkColorFilter.h" | 9 #include "third_party/skia/include/core/SkColorFilter.h" |
10 #include "third_party/skia/include/core/SkImageFilter.h" | 10 #include "third_party/skia/include/core/SkImageFilter.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 builder.addFlag(paint.isLCDRenderText(), "LCDRenderText"); | 237 builder.addFlag(paint.isLCDRenderText(), "LCDRenderText"); |
238 builder.addFlag(paint.isEmbeddedBitmapText(), "EmbeddedBitmapText"); | 238 builder.addFlag(paint.isEmbeddedBitmapText(), "EmbeddedBitmapText"); |
239 builder.addFlag(paint.isAutohinted(), "Autohinted"); | 239 builder.addFlag(paint.isAutohinted(), "Autohinted"); |
240 builder.addFlag(paint.isVerticalText(), "VerticalText"); | 240 builder.addFlag(paint.isVerticalText(), "VerticalText"); |
241 builder.addFlag(paint.getFlags() & SkPaint::kGenA8FromLCD_Flag, | 241 builder.addFlag(paint.getFlags() & SkPaint::kGenA8FromLCD_Flag, |
242 "GenA8FromLCD"); | 242 "GenA8FromLCD"); |
243 | 243 |
244 val->SetString("Flags", builder.str()); | 244 val->SetString("Flags", builder.str()); |
245 } | 245 } |
246 | 246 |
247 if (paint.getFilterLevel() != default_paint.getFilterLevel()) { | 247 if (paint.getFilterQuality() != default_paint.getFilterQuality()) { |
248 static const char* gFilterLevelStrings[] = | 248 static const char* gFilterQualityStrings[] = { |
249 { "None", "Low", "Medium", "High" }; | 249 "None", "Low", "Medium", "High"}; |
250 DCHECK_LT(static_cast<size_t>(paint.getFilterLevel()), | 250 DCHECK_LT(static_cast<size_t>(paint.getFilterQuality()), |
251 SK_ARRAY_COUNT(gFilterLevelStrings)); | 251 SK_ARRAY_COUNT(gFilterQualityStrings)); |
252 val->SetString("FilterLevel", gFilterLevelStrings[paint.getFilterLevel()]); | 252 val->SetString("FilterQuality", |
| 253 gFilterQualityStrings[paint.getFilterQuality()]); |
253 } | 254 } |
254 | 255 |
255 if (paint.getTextSize() != default_paint.getTextSize()) | 256 if (paint.getTextSize() != default_paint.getTextSize()) |
256 val->SetDouble("TextSize", paint.getTextSize()); | 257 val->SetDouble("TextSize", paint.getTextSize()); |
257 | 258 |
258 if (paint.getTextScaleX() != default_paint.getTextScaleX()) | 259 if (paint.getTextScaleX() != default_paint.getTextScaleX()) |
259 val->SetDouble("TextScaleX", paint.getTextScaleX()); | 260 val->SetDouble("TextScaleX", paint.getTextScaleX()); |
260 | 261 |
261 if (paint.getTextSkewX() != default_paint.getTextSkewX()) | 262 if (paint.getTextSkewX() != default_paint.getTextSkewX()) |
262 val->SetDouble("TextSkewX", paint.getTextSkewX()); | 263 val->SetDouble("TextSkewX", paint.getTextSkewX()); |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 DCHECK(blob); | 813 DCHECK(blob); |
813 AutoOp op(this, "DrawTextBlob", &paint); | 814 AutoOp op(this, "DrawTextBlob", &paint); |
814 op.addParam("blob", AsValue(*blob)); | 815 op.addParam("blob", AsValue(*blob)); |
815 op.addParam("x", AsValue(x)); | 816 op.addParam("x", AsValue(x)); |
816 op.addParam("y", AsValue(y)); | 817 op.addParam("y", AsValue(y)); |
817 | 818 |
818 INHERITED::onDrawTextBlob(blob, x, y, *op.paint()); | 819 INHERITED::onDrawTextBlob(blob, x, y, *op.paint()); |
819 } | 820 } |
820 | 821 |
821 } // namespace skia | 822 } // namespace skia |
OLD | NEW |