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

Side by Side Diff: bench/ImageDecodeBench.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, 2 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 | « no previous file | bench/SkipZeroesBench.cpp » ('j') | gyp/images.gyp » ('J')
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 "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkData.h" 10 #include "SkData.h"
11 #include "SkForceLinking.h"
12 #include "SkImageDecoder.h" 11 #include "SkImageDecoder.h"
13 #include "SkOSFile.h" 12 #include "SkOSFile.h"
14 #include "SkStream.h" 13 #include "SkStream.h"
15 #include "SkString.h" 14 #include "SkString.h"
16 15
17 __SK_FORCE_IMAGE_DECODER_LINKING;
18
19 class SkCanvas; 16 class SkCanvas;
20 17
21 class ImageDecodeBench : public Benchmark { 18 class ImageDecodeBench : public Benchmark {
22 public: 19 public:
23 ImageDecodeBench(void* p, const char* filename) 20 ImageDecodeBench(void* p, const char* filename)
24 : fName("image_decode_") 21 : fName("image_decode_")
25 , fFilename(filename) 22 , fFilename(filename)
26 , fStream() 23 , fStream()
27 , fValid(false) { 24 , fValid(false) {
28 fName.append(SkOSPath::Basename(filename)); 25 fName.append(SkOSPath::Basename(filename));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const SkString fFilename; 81 const SkString fFilename;
85 SkMemoryStream fStream; 82 SkMemoryStream fStream;
86 bool fValid; 83 bool fValid;
87 84
88 typedef Benchmark INHERITED; 85 typedef Benchmark INHERITED;
89 }; 86 };
90 87
91 // These are files which call decodePalette 88 // These are files which call decodePalette
92 //DEF_BENCH( return SkNEW_ARGS(ImageDecodeBench, ("/usr/local/google/home/scrogg o/Downloads/images/hal_163x90.png")); ) 89 //DEF_BENCH( return SkNEW_ARGS(ImageDecodeBench, ("/usr/local/google/home/scrogg o/Downloads/images/hal_163x90.png")); )
93 //DEF_BENCH( return SkNEW_ARGS(ImageDecodeBench, ("/usr/local/google/home/scrogg o/Downloads/images/box_19_top-left.png")); ) 90 //DEF_BENCH( return SkNEW_ARGS(ImageDecodeBench, ("/usr/local/google/home/scrogg o/Downloads/images/box_19_top-left.png")); )
OLDNEW
« no previous file with comments | « no previous file | bench/SkipZeroesBench.cpp » ('j') | gyp/images.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698