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

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: Move allocation outside of the loop. 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') | bench/CodecBench.cpp » ('J')
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 "SkImageInfo.h"
14 #include "SkStream.h"
15 #include "SkString.h"
16
17 class SkData;
18
19 /**
20 * Time SkCodec.
21 */
22 class CodecBench : public Benchmark {
23 public:
24 // Calls encoded->ref()
25 CodecBench(SkString basename, SkData* encoded, SkColorType colorType);
26
27 protected:
28 const char* onGetName() override;
29 bool isSuitableFor(Backend backend) override;
30 void onDraw(const int n, SkCanvas* canvas) override;
31 void onPreDraw() override;
32
33 private:
34 SkString fName;
35 const SkColorType fColorType;
36 SkAutoTDelete<SkMemoryStream> fStream;
37 SkBitmap fBitmap;
38 typedef Benchmark INHERITED;
39 };
40 #endif // CodecBench_DEFINED
OLDNEW
« no previous file with comments | « no previous file | bench/CodecBench.cpp » ('j') | bench/CodecBench.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698