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

Side by Side Diff: bench/MorphologyBench.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/MatrixConvolutionBench.cpp ('k') | bench/RectBench.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 2012 Google Inc. 2 * Copyright 2012 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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
11 #include "SkRandom.h" 11 #include "SkRandom.h"
12 #include "SkShader.h" 12 #include "SkShader.h"
13 #include "SkString.h" 13 #include "SkString.h"
14 #include "SkMorphologyImageFilter.h" 14 #include "SkMorphologyImageFilter.h"
15 15
16 #define SMALL SkIntToScalar(2) 16 #define SMALL SkIntToScalar(2)
17 #define REAL SkFloatToScalar(1.5f) 17 #define REAL 1.5f
18 #define BIG SkIntToScalar(10) 18 #define BIG SkIntToScalar(10)
19 19
20 enum MorphologyType { 20 enum MorphologyType {
21 kErode_MT, 21 kErode_MT,
22 kDilate_MT 22 kDilate_MT
23 }; 23 };
24 24
25 static const char* gStyleName[] = { 25 static const char* gStyleName[] = {
26 "erode", 26 "erode",
27 "dilate" 27 "dilate"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DEF_BENCH( return new MorphologyBench(SMALL, kDilate_MT); ) 91 DEF_BENCH( return new MorphologyBench(SMALL, kDilate_MT); )
92 92
93 DEF_BENCH( return new MorphologyBench(BIG, kErode_MT); ) 93 DEF_BENCH( return new MorphologyBench(BIG, kErode_MT); )
94 DEF_BENCH( return new MorphologyBench(BIG, kDilate_MT); ) 94 DEF_BENCH( return new MorphologyBench(BIG, kDilate_MT); )
95 95
96 DEF_BENCH( return new MorphologyBench(REAL, kErode_MT); ) 96 DEF_BENCH( return new MorphologyBench(REAL, kErode_MT); )
97 DEF_BENCH( return new MorphologyBench(REAL, kDilate_MT); ) 97 DEF_BENCH( return new MorphologyBench(REAL, kDilate_MT); )
98 98
99 DEF_BENCH( return new MorphologyBench(0, kErode_MT); ) 99 DEF_BENCH( return new MorphologyBench(0, kErode_MT); )
100 #endif 100 #endif
OLDNEW
« no previous file with comments | « bench/MatrixConvolutionBench.cpp ('k') | bench/RectBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698