| 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 "skia/ext/benchmarking_canvas.h" | 5 #include "skia/ext/benchmarking_canvas.h" | 
| 6 | 6 | 
| 7 #include <memory> | 7 #include <memory> | 
| 8 #include <utility> | 8 #include <utility> | 
| 9 | 9 | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 112   val->SetInteger("a", SkColorGetA(color)); | 112   val->SetInteger("a", SkColorGetA(color)); | 
| 113   val->SetInteger("r", SkColorGetR(color)); | 113   val->SetInteger("r", SkColorGetR(color)); | 
| 114   val->SetInteger("g", SkColorGetG(color)); | 114   val->SetInteger("g", SkColorGetG(color)); | 
| 115   val->SetInteger("b", SkColorGetB(color)); | 115   val->SetInteger("b", SkColorGetB(color)); | 
| 116 | 116 | 
| 117   return std::move(val); | 117   return std::move(val); | 
| 118 } | 118 } | 
| 119 | 119 | 
| 120 std::unique_ptr<base::Value> AsValue(SkBlendMode mode) { | 120 std::unique_ptr<base::Value> AsValue(SkBlendMode mode) { | 
| 121   std::unique_ptr<base::StringValue> val( | 121   std::unique_ptr<base::StringValue> val( | 
| 122       new base::StringValue(SkXfermode::ModeName(mode))); | 122       new base::StringValue(SkBlendMode_Name(mode))); | 
| 123 | 123 | 
| 124   return std::move(val); | 124   return std::move(val); | 
| 125 } | 125 } | 
| 126 | 126 | 
| 127 std::unique_ptr<base::Value> AsValue(SkCanvas::PointMode mode) { | 127 std::unique_ptr<base::Value> AsValue(SkCanvas::PointMode mode) { | 
| 128   static const char* gModeStrings[] = { "Points", "Lines", "Polygon" }; | 128   static const char* gModeStrings[] = { "Points", "Lines", "Polygon" }; | 
| 129   DCHECK_LT(static_cast<size_t>(mode), SK_ARRAY_COUNT(gModeStrings)); | 129   DCHECK_LT(static_cast<size_t>(mode), SK_ARRAY_COUNT(gModeStrings)); | 
| 130 | 130 | 
| 131   std::unique_ptr<base::StringValue> val( | 131   std::unique_ptr<base::StringValue> val( | 
| 132       new base::StringValue(gModeStrings[mode])); | 132       new base::StringValue(gModeStrings[mode])); | 
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 714   DCHECK(blob); | 714   DCHECK(blob); | 
| 715   AutoOp op(this, "DrawTextBlob", &paint); | 715   AutoOp op(this, "DrawTextBlob", &paint); | 
| 716   op.addParam("blob", AsValue(*blob)); | 716   op.addParam("blob", AsValue(*blob)); | 
| 717   op.addParam("x", AsValue(x)); | 717   op.addParam("x", AsValue(x)); | 
| 718   op.addParam("y", AsValue(y)); | 718   op.addParam("y", AsValue(y)); | 
| 719 | 719 | 
| 720   INHERITED::onDrawTextBlob(blob, x, y, *op.paint()); | 720   INHERITED::onDrawTextBlob(blob, x, y, *op.paint()); | 
| 721 } | 721 } | 
| 722 | 722 | 
| 723 } // namespace skia | 723 } // namespace skia | 
| OLD | NEW | 
|---|