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

Side by Side Diff: bench/ColorCodecBench.h

Issue 2031053005: Use SK_TEST_QCMS to mark qcms test code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 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 #ifndef ColorCodecBench_DEFINED 8 #ifndef ColorCodecBench_DEFINED
9 #define ColorCodecBench_DEFINED 9 #define ColorCodecBench_DEFINED
10 10
11 #include "Benchmark.h" 11 #include "Benchmark.h"
12 #include "SkData.h" 12 #include "SkData.h"
13 #include "SkImageInfo.h" 13 #include "SkImageInfo.h"
14 14
15 #if !defined(GOOGLE3) 15 #if defined(SK_TEST_QCMS)
16 #include "qcms.h" 16 #include "qcms.h"
17 #endif 17 #endif
18 18
19 class ColorCodecBench : public Benchmark { 19 class ColorCodecBench : public Benchmark {
20 public: 20 public:
21 ColorCodecBench(const char* name, sk_sp<SkData> encoded); 21 ColorCodecBench(const char* name, sk_sp<SkData> encoded);
22 22
23 protected: 23 protected:
24 const char* onGetName() override; 24 const char* onGetName() override;
25 bool isSuitableFor(Backend backend) override; 25 bool isSuitableFor(Backend backend) override;
26 void onDraw(int n, SkCanvas* canvas) override; 26 void onDraw(int n, SkCanvas* canvas) override;
27 void onDelayedSetup() override; 27 void onDelayedSetup() override;
28 28
29 private: 29 private:
30 void decodeAndXform(); 30 void decodeAndXform();
31 void xformOnly(); 31 void xformOnly();
32 #if !defined(GOOGLE3) 32 #if !defined(GOOGLE3)
33 void decodeAndXformQCMS(); 33 void decodeAndXformQCMS();
34 void xformOnlyQCMS(); 34 void xformOnlyQCMS();
35 #endif 35 #endif
36 36
37 SkString fName; 37 SkString fName;
38 sk_sp<SkData> fEncoded; 38 sk_sp<SkData> fEncoded;
39 SkImageInfo fInfo; 39 SkImageInfo fInfo;
40 SkAutoMalloc fDst; 40 SkAutoMalloc fDst;
41 SkAutoMalloc fSrc; 41 SkAutoMalloc fSrc;
42 sk_sp<SkColorSpace> fDstSpace; 42 sk_sp<SkColorSpace> fDstSpace;
43 #if !defined(GOOGLE3) 43 #if defined(SK_TEST_QCMS)
44 SkAutoTCallVProc<qcms_profile, qcms_profile_release> fDstSpaceQCMS; 44 SkAutoTCallVProc<qcms_profile, qcms_profile_release> fDstSpaceQCMS;
45 #endif 45 #endif
46 sk_sp<SkData> fSrcData; 46 sk_sp<SkData> fSrcData;
47 47
48 typedef Benchmark INHERITED; 48 typedef Benchmark INHERITED;
49 }; 49 };
50 #endif // ColorCodecBench_DEFINED 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