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

Side by Side Diff: bench/WritePixelsBench.cpp

Issue 23876006: Refactoring: get rid of the SkBenchmark void* parameter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: sync to head Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « bench/VertBench.cpp ('k') | bench/WriterBench.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 2013 Google Inc. 3 * Copyright 2013 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 8
9 #include "SkBenchmark.h" 9 #include "SkBenchmark.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
11 #include "SkConfig8888.h" 11 #include "SkConfig8888.h"
12 #include "SkString.h" 12 #include "SkString.h"
13 13
14 class WritePixelsBench : public SkBenchmark { 14 class WritePixelsBench : public SkBenchmark {
15 public: 15 public:
16 WritePixelsBench(void* param, SkCanvas::Config8888 config) 16 WritePixelsBench(SkCanvas::Config8888 config)
17 : INHERITED(param) 17 : fConfig(config)
18 , fConfig(config)
19 , fName("writepix") { 18 , fName("writepix") {
20 switch (config) { 19 switch (config) {
21 case SkCanvas::kNative_Premul_Config8888: 20 case SkCanvas::kNative_Premul_Config8888:
22 fName.append("_native_PM"); 21 fName.append("_native_PM");
23 break; 22 break;
24 case SkCanvas::kNative_Unpremul_Config8888: 23 case SkCanvas::kNative_Unpremul_Config8888:
25 fName.append("_native_UPM"); 24 fName.append("_native_UPM");
26 break; 25 break;
27 case SkCanvas::kBGRA_Premul_Config8888: 26 case SkCanvas::kBGRA_Premul_Config8888:
28 fName.append("_bgra_PM"); 27 fName.append("_bgra_PM");
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 62
64 private: 63 private:
65 SkCanvas::Config8888 fConfig; 64 SkCanvas::Config8888 fConfig;
66 SkString fName; 65 SkString fName;
67 66
68 typedef SkBenchmark INHERITED; 67 typedef SkBenchmark INHERITED;
69 }; 68 };
70 69
71 ////////////////////////////////////////////////////////////////////////////// 70 //////////////////////////////////////////////////////////////////////////////
72 71
73 DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (p, SkCanvas::kRGBA_Premul_Config 8888)); ) 72 DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (SkCanvas::kRGBA_Premul_Config888 8)); )
74 DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (p, SkCanvas::kRGBA_Unpremul_Conf ig8888)); ) 73 DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (SkCanvas::kRGBA_Unpremul_Config8 888)); )
OLDNEW
« no previous file with comments | « bench/VertBench.cpp ('k') | bench/WriterBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698