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

Side by Side Diff: bench/WritePixelsBench.cpp

Issue 347823004: Remove Sk prefix from some bench classes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: SkGMBench -> GMBench Created 6 years, 6 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 | « 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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "Benchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkString.h" 10 #include "SkString.h"
11 11
12 class WritePixelsBench : public SkBenchmark { 12 class WritePixelsBench : public Benchmark {
13 public: 13 public:
14 WritePixelsBench(SkColorType ct, SkAlphaType at) 14 WritePixelsBench(SkColorType ct, SkAlphaType at)
15 : fColorType(ct) 15 : fColorType(ct)
16 , fAlphaType(at) 16 , fAlphaType(at)
17 , fName("writepix") 17 , fName("writepix")
18 { 18 {
19 switch (ct) { 19 switch (ct) {
20 case kRGBA_8888_SkColorType: 20 case kRGBA_8888_SkColorType:
21 fName.append("_RGBA"); 21 fName.append("_RGBA");
22 break; 22 break;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 for (int loop = 0; loop < loops; ++loop) { 61 for (int loop = 0; loop < loops; ++loop) {
62 canvas->writePixels(info, bmp.getPixels(), bmp.rowBytes(), 0, 0); 62 canvas->writePixels(info, bmp.getPixels(), bmp.rowBytes(), 0, 0);
63 } 63 }
64 } 64 }
65 65
66 private: 66 private:
67 SkColorType fColorType; 67 SkColorType fColorType;
68 SkAlphaType fAlphaType; 68 SkAlphaType fAlphaType;
69 SkString fName; 69 SkString fName;
70 70
71 typedef SkBenchmark INHERITED; 71 typedef Benchmark INHERITED;
72 }; 72 };
73 73
74 ////////////////////////////////////////////////////////////////////////////// 74 //////////////////////////////////////////////////////////////////////////////
75 75
76 DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (kRGBA_8888_SkColorType, kPremul_ SkAlphaType)); ) 76 DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (kRGBA_8888_SkColorType, kPremul_ SkAlphaType)); )
77 DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (kRGBA_8888_SkColorType, kUnpremu l_SkAlphaType)); ) 77 DEF_BENCH( return SkNEW_ARGS(WritePixelsBench, (kRGBA_8888_SkColorType, kUnpremu l_SkAlphaType)); )
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