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

Side by Side Diff: bench/CodecBench.h

Issue 1044363002: Add timing SkCodec to nanobench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: CodecBench decodes to fColorType, as intended. Created 5 years, 8 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/CodecBench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef CodecBench_DEFINED
9 #define CodecBench_DEFINED
10
11 #include "Benchmark.h"
12 #include "SkBitmap.h"
13 #include "SkData.h"
14 #include "SkImageInfo.h"
15 #include "SkRefCnt.h"
16 #include "SkString.h"
17
18 /**
19 * Time SkCodec.
20 */
21 class CodecBench : public Benchmark {
22 public:
23 // Calls encoded->ref()
24 CodecBench(SkString basename, SkData* encoded, SkColorType colorType);
25
26 protected:
27 const char* onGetName() override;
28 bool isSuitableFor(Backend backend) override;
29 void onDraw(const int n, SkCanvas* canvas) override;
30 void onPreDraw() override;
31
32 private:
33 SkString fName;
34 const SkColorType fColorType;
35 SkAutoTUnref<SkData> fData;
36 SkBitmap fBitmap;
37 typedef Benchmark INHERITED;
38 };
39 #endif // CodecBench_DEFINED
OLDNEW
« no previous file with comments | « no previous file | bench/CodecBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698