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

Side by Side Diff: bench/ColorCodecBench.h

Issue 2035793002: Add color correction benchmark - with comparison to qcms (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 6 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/ColorCodecBench.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 2016 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 ColorCodecBench_DEFINED
9 #define ColorCodecBench_DEFINED
10
11 #include "Benchmark.h"
12 #include "SkData.h"
13 #include "SkImageInfo.h"
14
15 #if !defined(GOOGLE3)
16 #include "qcms.h"
17 #endif
18
19 class ColorCodecBench : public Benchmark {
20 public:
21 ColorCodecBench(const char* name, sk_sp<SkData> encoded);
22
23 protected:
24 const char* onGetName() override;
25 bool isSuitableFor(Backend backend) override;
26 void onDraw(int n, SkCanvas* canvas) override;
27 void onDelayedSetup() override;
28
29 private:
30 void decodeAndXform();
31 void xformOnly();
32 #if !defined(GOOGLE3)
33 void decodeAndXformQCMS();
34 void xformOnlyQCMS();
35 #endif
36
37 SkString fName;
38 sk_sp<SkData> fEncoded;
39 SkImageInfo fInfo;
40 SkAutoMalloc fDst;
41 SkAutoMalloc fSrc;
42 sk_sp<SkColorSpace> fDstSpace;
43 #if !defined(GOOGLE3)
44 SkAutoTCallVProc<qcms_profile, qcms_profile_release> fDstSpaceQCMS;
45 #endif
46 sk_sp<SkData> fSrcData;
47
48 typedef Benchmark INHERITED;
49 };
50 #endif // ColorCodecBench_DEFINED
OLDNEW
« no previous file with comments | « no previous file | bench/ColorCodecBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698