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

Side by Side Diff: bench/PremulAndUnpremulAlphaOpsBench.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/PictureRecordBench.cpp ('k') | bench/QuadTreeBench.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 "SkConfig8888.h" 10 #include "SkConfig8888.h"
11 #include "SkString.h" 11 #include "SkString.h"
12 #include "sk_tool_utils.h" 12 #include "sk_tool_utils.h"
13 13
14 class PremulAndUnpremulAlphaOpsBench : public SkBenchmark { 14 class PremulAndUnpremulAlphaOpsBench : public Benchmark {
15 enum { 15 enum {
16 W = 256, 16 W = 256,
17 H = 256, 17 H = 256,
18 }; 18 };
19 SkBitmap fBmp1, fBmp2; 19 SkBitmap fBmp1, fBmp2;
20 20
21 public: 21 public:
22 PremulAndUnpremulAlphaOpsBench(SkColorType ct) { 22 PremulAndUnpremulAlphaOpsBench(SkColorType ct) {
23 fColorType = ct; 23 fColorType = ct;
24 fName.printf("premul_and_unpremul_alpha_%s", sk_tool_utils::colortype_na me(ct)); 24 fName.printf("premul_and_unpremul_alpha_%s", sk_tool_utils::colortype_na me(ct));
(...skipping 26 matching lines...) Expand all
51 canvas->writePixels(fBmp1.info(), fBmp1.getPixels(), fBmp1.rowBytes( ), 0, 0); 51 canvas->writePixels(fBmp1.info(), fBmp1.getPixels(), fBmp1.rowBytes( ), 0, 0);
52 // Premul -> Unpremul 52 // Premul -> Unpremul
53 canvas->readPixels(fBmp2.info(), fBmp2.getPixels(), fBmp2.rowBytes() , 0, 0); 53 canvas->readPixels(fBmp2.info(), fBmp2.getPixels(), fBmp2.rowBytes() , 0, 0);
54 } 54 }
55 } 55 }
56 56
57 private: 57 private:
58 SkColorType fColorType; 58 SkColorType fColorType;
59 SkString fName; 59 SkString fName;
60 60
61 typedef SkBenchmark INHERITED; 61 typedef Benchmark INHERITED;
62 }; 62 };
63 63
64 64
65 DEF_BENCH(return new PremulAndUnpremulAlphaOpsBench(kRGBA_8888_SkColorType)); 65 DEF_BENCH(return new PremulAndUnpremulAlphaOpsBench(kRGBA_8888_SkColorType));
66 DEF_BENCH(return new PremulAndUnpremulAlphaOpsBench(kBGRA_8888_SkColorType)); 66 DEF_BENCH(return new PremulAndUnpremulAlphaOpsBench(kBGRA_8888_SkColorType));
OLDNEW
« no previous file with comments | « bench/PictureRecordBench.cpp ('k') | bench/QuadTreeBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698