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

Side by Side Diff: bench/AAClipBench.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | bench/BicubicBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkAAClip.h" 9 #include "SkAAClip.h"
10 #include "SkPath.h" 10 #include "SkPath.h"
(...skipping 14 matching lines...) Expand all
25 25
26 public: 26 public:
27 AAClipBench(bool doPath, bool doAA) 27 AAClipBench(bool doPath, bool doAA)
28 : fDoPath(doPath) 28 : fDoPath(doPath)
29 , fDoAA(doAA) { 29 , fDoAA(doAA) {
30 30
31 fName.printf("aaclip_%s_%s", 31 fName.printf("aaclip_%s_%s",
32 doPath ? "path" : "rect", 32 doPath ? "path" : "rect",
33 doAA ? "AA" : "BW"); 33 doAA ? "AA" : "BW");
34 34
35 fClipRect.set(SkFloatToScalar(10.5f), SkFloatToScalar(10.5f), 35 fClipRect.set(10.5f, 10.5f,
36 SkFloatToScalar(50.5f), SkFloatToScalar(50.5f)); 36 50.5f, 50.5f);
37 fClipPath.addRoundRect(fClipRect, SkIntToScalar(10), SkIntToScalar(10)); 37 fClipPath.addRoundRect(fClipRect, SkIntToScalar(10), SkIntToScalar(10));
38 fDrawRect.set(SkIntToScalar(0), SkIntToScalar(0), 38 fDrawRect.set(SkIntToScalar(0), SkIntToScalar(0),
39 SkIntToScalar(100), SkIntToScalar(100)); 39 SkIntToScalar(100), SkIntToScalar(100));
40 40
41 SkASSERT(fClipPath.isConvex()); 41 SkASSERT(fClipPath.isConvex());
42 } 42 }
43 43
44 protected: 44 protected:
45 virtual const char* onGetName() { return fName.c_str(); } 45 virtual const char* onGetName() { return fName.c_str(); }
46 virtual void onDraw(SkCanvas* canvas) { 46 virtual void onDraw(SkCanvas* canvas) {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 DEF_BENCH( return SkNEW_ARGS(AAClipBuilderBench, (false, true)); ) 248 DEF_BENCH( return SkNEW_ARGS(AAClipBuilderBench, (false, true)); )
249 DEF_BENCH( return SkNEW_ARGS(AAClipBuilderBench, (true, false)); ) 249 DEF_BENCH( return SkNEW_ARGS(AAClipBuilderBench, (true, false)); )
250 DEF_BENCH( return SkNEW_ARGS(AAClipBuilderBench, (true, true)); ) 250 DEF_BENCH( return SkNEW_ARGS(AAClipBuilderBench, (true, true)); )
251 DEF_BENCH( return SkNEW_ARGS(AAClipRegionBench, ()); ) 251 DEF_BENCH( return SkNEW_ARGS(AAClipRegionBench, ()); )
252 DEF_BENCH( return SkNEW_ARGS(AAClipBench, (false, false)); ) 252 DEF_BENCH( return SkNEW_ARGS(AAClipBench, (false, false)); )
253 DEF_BENCH( return SkNEW_ARGS(AAClipBench, (false, true)); ) 253 DEF_BENCH( return SkNEW_ARGS(AAClipBench, (false, true)); )
254 DEF_BENCH( return SkNEW_ARGS(AAClipBench, (true, false)); ) 254 DEF_BENCH( return SkNEW_ARGS(AAClipBench, (true, false)); )
255 DEF_BENCH( return SkNEW_ARGS(AAClipBench, (true, true)); ) 255 DEF_BENCH( return SkNEW_ARGS(AAClipBench, (true, true)); )
256 DEF_BENCH( return SkNEW_ARGS(NestedAAClipBench, (false)); ) 256 DEF_BENCH( return SkNEW_ARGS(NestedAAClipBench, (false)); )
257 DEF_BENCH( return SkNEW_ARGS(NestedAAClipBench, (true)); ) 257 DEF_BENCH( return SkNEW_ARGS(NestedAAClipBench, (true)); )
OLDNEW
« no previous file with comments | « no previous file | bench/BicubicBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698