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

Side by Side Diff: bench/SkipZeroesBench.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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
« no previous file with comments | « bench/SKPBench.cpp ('k') | bench/StrokeBench.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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "Resources.h" 9 #include "Resources.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
11 #include "SkData.h" 11 #include "SkData.h"
12 #include "SkForceLinking.h" 12 #include "SkForceLinking.h"
13 #include "SkImageDecoder.h" 13 #include "SkImageDecoder.h"
14 #include "SkOSFile.h" 14 #include "SkOSFile.h"
15 #include "SkStream.h" 15 #include "SkStream.h"
16 #include "SkString.h" 16 #include "SkString.h"
17 17
18 __SK_FORCE_IMAGE_DECODER_LINKING; 18 __SK_FORCE_IMAGE_DECODER_LINKING;
19 19
20 class SkCanvas; 20 class SkCanvas;
21 21
22 class SkipZeroesBench : public Benchmark { 22 class SkipZeroesBench : public Benchmark {
23 public: 23 public:
24 SkipZeroesBench(const char* filename, bool skipZeroes) 24 SkipZeroesBench(const char* filename, bool skipZeroes)
25 : fName("SkipZeroes_") 25 : fName("SkipZeroes_")
26 , fDecoder(NULL) 26 , fDecoder(nullptr)
27 , fFilename(filename) 27 , fFilename(filename)
28 , fStream() 28 , fStream()
29 , fSkipZeroes(skipZeroes) 29 , fSkipZeroes(skipZeroes)
30 , fValid(false) { 30 , fValid(false) {
31 fName.append(filename); 31 fName.append(filename);
32 if (skipZeroes) { 32 if (skipZeroes) {
33 fName.append("_skip_zeroes"); 33 fName.append("_skip_zeroes");
34 } else { 34 } else {
35 fName.append("_write_zeroes"); 35 fName.append("_write_zeroes");
36 } 36 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 SkMemoryStream fStream; 108 SkMemoryStream fStream;
109 bool fSkipZeroes; 109 bool fSkipZeroes;
110 bool fValid; 110 bool fValid;
111 111
112 typedef Benchmark INHERITED; 112 typedef Benchmark INHERITED;
113 }; 113 };
114 114
115 // Enable the true version once the feature is checked in. 115 // Enable the true version once the feature is checked in.
116 DEF_BENCH(return new SkipZeroesBench("arrow.png", true)); 116 DEF_BENCH(return new SkipZeroesBench("arrow.png", true));
117 DEF_BENCH(return new SkipZeroesBench("arrow.png", false)); 117 DEF_BENCH(return new SkipZeroesBench("arrow.png", false));
OLDNEW
« no previous file with comments | « bench/SKPBench.cpp ('k') | bench/StrokeBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698