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

Side by Side Diff: bench/subset/SubsetSingleBench.h

Issue 1430493005: Delete dead subset benches from nanobench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Build fix: delete unused fUseCodec Created 5 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/nanobench.cpp ('k') | bench/subset/SubsetSingleBench.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 2015 Google Inc. 2 * Copyright 2015 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 "SkImageDecoder.h" 9 #include "SkImageDecoder.h"
10 #include "SkImageInfo.h" 10 #include "SkImageInfo.h"
11 #include "SkStream.h" 11 #include "SkStream.h"
12 #include "SkString.h" 12 #include "SkString.h"
13 13
14 /* 14 /*
15 * 15 *
16 * This benchmark is designed to test the performance of subset decoding. 16 * This benchmark is designed to test the performance of subset decoding.
17 * It uses an input width, height, left, and top to decode a single subset. 17 * It uses an input width, height, left, and top to decode a single subset.
18 * 18 *
19 */ 19 */
20 class SubsetSingleBench : public Benchmark { 20 class SubsetSingleBench : public Benchmark {
21 public: 21 public:
22 22
23 SubsetSingleBench(const SkString& path, 23 SubsetSingleBench(const SkString& path,
24 SkColorType colorType, 24 SkColorType colorType,
25 uint32_t subsetWidth, 25 uint32_t subsetWidth,
26 uint32_t subsetHeight, 26 uint32_t subsetHeight,
27 uint32_t offsetLeft, 27 uint32_t offsetLeft,
28 uint32_t offsetTop, 28 uint32_t offsetTop);
29 bool useCodec);
30 29
31 protected: 30 protected:
32 const char* onGetName() override; 31 const char* onGetName() override;
33 bool isSuitableFor(Backend backend) override; 32 bool isSuitableFor(Backend backend) override;
34 void onDraw(int n, SkCanvas* canvas) override; 33 void onDraw(int n, SkCanvas* canvas) override;
35 34
36 private: 35 private:
37 SkString fName; 36 SkString fName;
38 SkColorType fColorType; 37 SkColorType fColorType;
39 const uint32_t fSubsetWidth; 38 const uint32_t fSubsetWidth;
40 const uint32_t fSubsetHeight; 39 const uint32_t fSubsetHeight;
41 const uint32_t fOffsetLeft; 40 const uint32_t fOffsetLeft;
42 const uint32_t fOffsetTop; 41 const uint32_t fOffsetTop;
43 const bool fUseCodec;
44 SkAutoTDelete<SkMemoryStream> fStream; 42 SkAutoTDelete<SkMemoryStream> fStream;
45 typedef Benchmark INHERITED; 43 typedef Benchmark INHERITED;
46 }; 44 };
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | bench/subset/SubsetSingleBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698