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

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

Issue 1010433008: remove reference to deprecated kHasFilter16 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 WARN_UNUSED_RESULT 149 WARN_UNUSED_RESULT
150 scoped_ptr<base::Value> AsValue(const SkColorFilter& filter) { 150 scoped_ptr<base::Value> AsValue(const SkColorFilter& filter) {
151 scoped_ptr<base::DictionaryValue> val(new base::DictionaryValue()); 151 scoped_ptr<base::DictionaryValue> val(new base::DictionaryValue());
152 152
153 if (unsigned flags = filter.getFlags()) { 153 if (unsigned flags = filter.getFlags()) {
154 FlagsBuilder builder('|'); 154 FlagsBuilder builder('|');
155 builder.addFlag(flags & SkColorFilter::kAlphaUnchanged_Flag, 155 builder.addFlag(flags & SkColorFilter::kAlphaUnchanged_Flag,
156 "kAlphaUnchanged_Flag"); 156 "kAlphaUnchanged_Flag");
157 builder.addFlag(flags & SkColorFilter::kHasFilter16_Flag,
158 "kHasFilter16_Flag");
159 157
160 val->SetString("flags", builder.str()); 158 val->SetString("flags", builder.str());
161 } 159 }
162 160
163 SkScalar color_matrix[20]; 161 SkScalar color_matrix[20];
164 if (filter.asColorMatrix(color_matrix)) { 162 if (filter.asColorMatrix(color_matrix)) {
165 scoped_ptr<base::ListValue> color_matrix_val(new base::ListValue()); 163 scoped_ptr<base::ListValue> color_matrix_val(new base::ListValue());
166 for (unsigned i = 0; i < 20; ++i) 164 for (unsigned i = 0; i < 20; ++i)
167 color_matrix_val->Append(AsValue(color_matrix[i]).release()); 165 color_matrix_val->Append(AsValue(color_matrix[i]).release());
168 166
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 DCHECK(blob); 811 DCHECK(blob);
814 AutoOp op(this, "DrawTextBlob", &paint); 812 AutoOp op(this, "DrawTextBlob", &paint);
815 op.addParam("blob", AsValue(*blob)); 813 op.addParam("blob", AsValue(*blob));
816 op.addParam("x", AsValue(x)); 814 op.addParam("x", AsValue(x));
817 op.addParam("y", AsValue(y)); 815 op.addParam("y", AsValue(y));
818 816
819 INHERITED::onDrawTextBlob(blob, x, y, *op.paint()); 817 INHERITED::onDrawTextBlob(blob, x, y, *op.paint());
820 } 818 }
821 819
822 } // namespace skia 820 } // namespace skia
OLDNEW
« 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