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

Side by Side Diff: skia/ext/benchmarking_canvas.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 29 matching lines...) Expand all
40 std::string str() const { 40 std::string str() const {
41 return oss_.str(); 41 return oss_.str();
42 } 42 }
43 43
44 private: 44 private:
45 char separator_; 45 char separator_;
46 std::ostringstream oss_; 46 std::ostringstream oss_;
47 }; 47 };
48 48
49 std::unique_ptr<base::Value> AsValue(bool b) { 49 std::unique_ptr<base::Value> AsValue(bool b) {
50 std::unique_ptr<base::FundamentalValue> val(new base::FundamentalValue(b)); 50 std::unique_ptr<base::Value> val(new base::Value(b));
51 51
52 return std::move(val); 52 return std::move(val);
53 } 53 }
54 54
55 std::unique_ptr<base::Value> AsValue(SkScalar scalar) { 55 std::unique_ptr<base::Value> AsValue(SkScalar scalar) {
56 std::unique_ptr<base::FundamentalValue> val( 56 std::unique_ptr<base::Value> val(
57 new base::FundamentalValue(scalar)); 57 new base::Value(scalar));
58 58
59 return std::move(val); 59 return std::move(val);
60 } 60 }
61 61
62 std::unique_ptr<base::Value> AsValue(const SkSize& size) { 62 std::unique_ptr<base::Value> AsValue(const SkSize& size) {
63 std::unique_ptr<base::DictionaryValue> val(new base::DictionaryValue()); 63 std::unique_ptr<base::DictionaryValue> val(new base::DictionaryValue());
64 val->Set("width", AsValue(size.width())); 64 val->Set("width", AsValue(size.width()));
65 val->Set("height", AsValue(size.height())); 65 val->Set("height", AsValue(size.height()));
66 66
67 return std::move(val); 67 return std::move(val);
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « services/preferences/public/cpp/tests/pref_observer_store_unittest.cc ('k') | tools/clang/value_cleanup/ListValueRewriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698