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

Side by Side Diff: bench/BlurBench.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 | « bench/BicubicBench.cpp ('k') | bench/BlurImageFilterBench.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkBenchmark.h" 8 #include "SkBenchmark.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkPaint.h" 11 #include "SkPaint.h"
12 #include "SkRandom.h" 12 #include "SkRandom.h"
13 #include "SkShader.h" 13 #include "SkShader.h"
14 #include "SkString.h" 14 #include "SkString.h"
15 #include "SkBlurMaskFilter.h" 15 #include "SkBlurMaskFilter.h"
16 16
17 #define SMALL SkIntToScalar(2) 17 #define SMALL SkIntToScalar(2)
18 #define REAL SkFloatToScalar(1.5f) 18 #define REAL 1.5f
19 #define BIG SkIntToScalar(10) 19 #define BIG SkIntToScalar(10)
20 #define REALBIG SkFloatToScalar(100.5f) 20 #define REALBIG 100.5f
21 21
22 static const char* gStyleName[] = { 22 static const char* gStyleName[] = {
23 "normal", 23 "normal",
24 "solid", 24 "solid",
25 "outer", 25 "outer",
26 "inner" 26 "inner"
27 }; 27 };
28 28
29 class BlurBench : public SkBenchmark { 29 class BlurBench : public SkBenchmark {
30 SkScalar fRadius; 30 SkScalar fRadius;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 DEF_BENCH(return new BlurBench(SMALL, SkBlurMaskFilter::kNormal_BlurStyle, SkBlu rMaskFilter::kHighQuality_BlurFlag);) 101 DEF_BENCH(return new BlurBench(SMALL, SkBlurMaskFilter::kNormal_BlurStyle, SkBlu rMaskFilter::kHighQuality_BlurFlag);)
102 102
103 DEF_BENCH(return new BlurBench(BIG, SkBlurMaskFilter::kNormal_BlurStyle, SkBlurM askFilter::kHighQuality_BlurFlag);) 103 DEF_BENCH(return new BlurBench(BIG, SkBlurMaskFilter::kNormal_BlurStyle, SkBlurM askFilter::kHighQuality_BlurFlag);)
104 104
105 DEF_BENCH(return new BlurBench(REALBIG, SkBlurMaskFilter::kNormal_BlurStyle, SkB lurMaskFilter::kHighQuality_BlurFlag);) 105 DEF_BENCH(return new BlurBench(REALBIG, SkBlurMaskFilter::kNormal_BlurStyle, SkB lurMaskFilter::kHighQuality_BlurFlag);)
106 106
107 DEF_BENCH(return new BlurBench(REAL, SkBlurMaskFilter::kNormal_BlurStyle, SkBlur MaskFilter::kHighQuality_BlurFlag);) 107 DEF_BENCH(return new BlurBench(REAL, SkBlurMaskFilter::kNormal_BlurStyle, SkBlur MaskFilter::kHighQuality_BlurFlag);)
108 108
109 DEF_BENCH(return new BlurBench(0, SkBlurMaskFilter::kNormal_BlurStyle);) 109 DEF_BENCH(return new BlurBench(0, SkBlurMaskFilter::kNormal_BlurStyle);)
OLDNEW
« no previous file with comments | « bench/BicubicBench.cpp ('k') | bench/BlurImageFilterBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698