| 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 13 matching lines...) Expand all Loading... |
| 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 SkDifferentPixelsMetric() : fPOIAlphaMask(false) {} | 30 SkDifferentPixelsMetric() : fPOIAlphaMask(false) {} |
| 31 | 31 |
| 32 virtual const char* getName() SK_OVERRIDE; | 32 virtual const char* getName() SK_OVERRIDE; |
| 33 virtual bool enablePOIAlphaMask() SK_OVERRIDE; | 33 virtual bool enablePOIAlphaMask() SK_OVERRIDE; |
| 34 virtual int queueDiff(SkBitmap* baseline, SkBitmap* test) SK_OVERRIDE; | 34 virtual bool diff(SkBitmap* baseline, SkBitmap* test, Result* result) SK_OVE
RRIDE; |
| 35 virtual void deleteDiff(int id) SK_OVERRIDE; | |
| 36 virtual bool isFinished(int id) SK_OVERRIDE; | |
| 37 virtual double getResult(int id) SK_OVERRIDE; | |
| 38 virtual int getPointsOfInterestCount(int id) SK_OVERRIDE; | |
| 39 virtual SkIPoint* getPointsOfInterest(int id) SK_OVERRIDE; | |
| 40 virtual SkBitmap* getPointsOfInterestAlphaMask(int id) SK_OVERRIDE; | |
| 41 | 35 |
| 42 protected: | 36 protected: |
| 43 #if SK_SUPPORT_OPENCL | 37 #if SK_SUPPORT_OPENCL |
| 44 virtual bool onInit() SK_OVERRIDE; | 38 virtual bool onInit() SK_OVERRIDE; |
| 45 #endif | 39 #endif |
| 46 | 40 |
| 47 private: | 41 private: |
| 48 bool fPOIAlphaMask; | 42 bool fPOIAlphaMask; |
| 49 | 43 |
| 50 struct QueuedDiff; | |
| 51 SkTDArray<QueuedDiff> fQueuedDiffs; | |
| 52 | |
| 53 #if SK_SUPPORT_OPENCL | 44 #if SK_SUPPORT_OPENCL |
| 54 cl_kernel fKernel; | 45 cl_kernel fKernel; |
| 55 | 46 |
| 56 typedef SkCLImageDiffer INHERITED; | 47 typedef SkCLImageDiffer INHERITED; |
| 57 #else | 48 #else |
| 58 typedef SkImageDiffer INHERITED; | 49 typedef SkImageDiffer INHERITED; |
| 59 #endif | 50 #endif |
| 60 }; | 51 }; |
| 61 | 52 |
| 62 #endif | 53 #endif |
| OLD | NEW |