OLD | NEW |
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 |
(...skipping 10 matching lines...) Expand all Loading... |
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 virtual const char* getName() const SK_OVERRIDE; |
31 virtual bool diff(SkBitmap* baseline, SkBitmap* test, bool computeMask, | 31 virtual bool diff(SkBitmap* baseline, SkBitmap* test, bool computeAlphaMask, |
32 Result* result) const SK_OVERRIDE; | 32 bool computeRgbDiff, bool computeWhiteDiff, Result* result
) const SK_OVERRIDE; |
33 | 33 |
34 protected: | 34 protected: |
35 #if SK_SUPPORT_OPENCL | 35 #if SK_SUPPORT_OPENCL |
36 virtual bool onInit() SK_OVERRIDE; | 36 virtual bool onInit() SK_OVERRIDE; |
37 #endif | 37 #endif |
38 | 38 |
39 private: | 39 private: |
40 #if SK_SUPPORT_OPENCL | 40 #if SK_SUPPORT_OPENCL |
41 cl_kernel fKernel; | 41 cl_kernel fKernel; |
42 | 42 |
43 typedef SkCLImageDiffer INHERITED; | 43 typedef SkCLImageDiffer INHERITED; |
44 #else | 44 #else |
45 typedef SkImageDiffer INHERITED; | 45 typedef SkImageDiffer INHERITED; |
46 #endif | 46 #endif |
47 }; | 47 }; |
48 | 48 |
49 #endif | 49 #endif |
OLD | NEW |