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

Side by Side Diff: bench/SkipZeroesBench.cpp

Issue 670453002: Remove image decoder and encoder autoregistration (Closed) Base URL: https://skia.googlesource.com/skia.git@separate-image-decoder-01-skpicture
Patch Set: Created 6 years, 1 month 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/ImageDecodeBench.cpp ('k') | bench/nanobench.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"
13 #include "SkImageDecoder.h" 12 #include "SkImageDecoder.h"
14 #include "SkOSFile.h" 13 #include "SkOSFile.h"
15 #include "SkStream.h" 14 #include "SkStream.h"
16 #include "SkString.h" 15 #include "SkString.h"
17 16
18 __SK_FORCE_IMAGE_DECODER_LINKING;
19
20 class SkCanvas; 17 class SkCanvas;
21 18
22 class SkipZeroesBench : public Benchmark { 19 class SkipZeroesBench : public Benchmark {
23 public: 20 public:
24 SkipZeroesBench(const char* filename, bool skipZeroes) 21 SkipZeroesBench(const char* filename, bool skipZeroes)
25 : fName("SkipZeroes_") 22 : fName("SkipZeroes_")
26 , fDecoder(NULL) 23 , fDecoder(NULL)
27 , fFilename(filename) 24 , fFilename(filename)
28 , fStream() 25 , fStream()
29 , fSkipZeroes(skipZeroes) 26 , fSkipZeroes(skipZeroes)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 SkMemoryStream fStream; 105 SkMemoryStream fStream;
109 bool fSkipZeroes; 106 bool fSkipZeroes;
110 bool fValid; 107 bool fValid;
111 108
112 typedef Benchmark INHERITED; 109 typedef Benchmark INHERITED;
113 }; 110 };
114 111
115 // Enable the true version once the feature is checked in. 112 // Enable the true version once the feature is checked in.
116 DEF_BENCH( return SkNEW_ARGS(SkipZeroesBench, ("arrow.png", true))); 113 DEF_BENCH( return SkNEW_ARGS(SkipZeroesBench, ("arrow.png", true)));
117 DEF_BENCH( return SkNEW_ARGS(SkipZeroesBench, ("arrow.png", false))); 114 DEF_BENCH( return SkNEW_ARGS(SkipZeroesBench, ("arrow.png", false)));
OLDNEW
« no previous file with comments | « bench/ImageDecodeBench.cpp ('k') | bench/nanobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698