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

Side by Side Diff: tools/skpdiff/SkDifferentPixelsMetric.h

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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 | « tools/skpdiff/SkDiffContext.cpp ('k') | tools/skpdiff/SkPMetric.h » ('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 2013 Google Inc. 2 * Copyright 2013 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 SkDifferentPixelsMetric_DEFINED 8 #ifndef SkDifferentPixelsMetric_DEFINED
9 #define SkDifferentPixelsMetric_DEFINED 9 #define SkDifferentPixelsMetric_DEFINED
10 10
11 #include "SkTDArray.h" 11 #include "SkTDArray.h"
12 12
13 #if SK_SUPPORT_OPENCL 13 #if SK_SUPPORT_OPENCL
14 #include "SkCLImageDiffer.h" 14 #include "SkCLImageDiffer.h"
15 #else 15 #else
16 #include "SkImageDiffer.h" 16 #include "SkImageDiffer.h"
17 #endif 17 #endif
18 18
19 /** 19 /**
20 * A differ that measures the percentage of different corresponding pixels. If t he two images are 20 * A differ that measures the percentage of different corresponding pixels. If t he two images are
21 * not the same size or have no pixels, the result will always be zero. 21 * not the same size or have no pixels, the result will always be zero.
22 */ 22 */
23 class SkDifferentPixelsMetric : 23 class SkDifferentPixelsMetric :
24 #if SK_SUPPORT_OPENCL 24 #if SK_SUPPORT_OPENCL
25 public SkCLImageDiffer { 25 public SkCLImageDiffer {
26 #else 26 #else
27 public SkImageDiffer { 27 public SkImageDiffer {
28 #endif 28 #endif
29 public: 29 public:
30 virtual const char* getName() const SK_OVERRIDE; 30 const char* getName() const SK_OVERRIDE;
31 virtual bool diff(SkBitmap* baseline, SkBitmap* test, 31 virtual bool diff(SkBitmap* baseline, SkBitmap* test,
32 const BitmapsToCreate& bitmapsToCreate, 32 const BitmapsToCreate& bitmapsToCreate,
33 Result* result) const SK_OVERRIDE; 33 Result* result) const SK_OVERRIDE;
34 34
35 protected: 35 protected:
36 #if SK_SUPPORT_OPENCL 36 #if SK_SUPPORT_OPENCL
37 virtual bool onInit() SK_OVERRIDE; 37 bool onInit() SK_OVERRIDE;
38 #endif 38 #endif
39 39
40 private: 40 private:
41 #if SK_SUPPORT_OPENCL 41 #if SK_SUPPORT_OPENCL
42 cl_kernel fKernel; 42 cl_kernel fKernel;
43 43
44 typedef SkCLImageDiffer INHERITED; 44 typedef SkCLImageDiffer INHERITED;
45 #else 45 #else
46 typedef SkImageDiffer INHERITED; 46 typedef SkImageDiffer INHERITED;
47 #endif 47 #endif
48 }; 48 };
49 49
50 #endif 50 #endif
OLDNEW
« no previous file with comments | « tools/skpdiff/SkDiffContext.cpp ('k') | tools/skpdiff/SkPMetric.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698