| 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 SkImageDiffer_DEFINED | 8 #ifndef SkImageDiffer_DEFINED |
| 9 #define SkImageDiffer_DEFINED | 9 #define SkImageDiffer_DEFINED |
| 10 | 10 |
| 11 class SkBitmap; | 11 class SkBitmap; |
| 12 struct SkIPoint; | 12 struct SkIPoint; |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * Encapsulates an image difference metric algorithm that can be potentially run
asynchronously. | 15 * Encapsulates an image difference metric algorithm that can be potentially run
asynchronously. |
| 16 */ | 16 */ |
| 17 class SkImageDiffer { | 17 class SkImageDiffer { |
| 18 public: | 18 public: |
| 19 SkImageDiffer(); | 19 SkImageDiffer(); |
| 20 virtual ~SkImageDiffer(); | 20 virtual ~SkImageDiffer(); |
| 21 | 21 |
| 22 static const double RESULT_CORRECT = 1.0f; | 22 static const double RESULT_CORRECT; |
| 23 static const double RESULT_INCORRECT = 0.0f; | 23 static const double RESULT_INCORRECT; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Gets a unique and descriptive name of this differ | 26 * Gets a unique and descriptive name of this differ |
| 27 * @return A statically allocated null terminated string that is the name of
this differ | 27 * @return A statically allocated null terminated string that is the name of
this differ |
| 28 */ | 28 */ |
| 29 virtual const char* getName() = 0; | 29 virtual const char* getName() = 0; |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * Gets if this differ is in a usable state | 32 * Gets if this differ is in a usable state |
| 33 * @return True if this differ can be used, false otherwise | 33 * @return True if this differ can be used, false otherwise |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 */ | 104 */ |
| 105 virtual SkBitmap* getPointsOfInterestAlphaMask(int id) { return NULL; } | 105 virtual SkBitmap* getPointsOfInterestAlphaMask(int id) { return NULL; } |
| 106 | 106 |
| 107 | 107 |
| 108 protected: | 108 protected: |
| 109 bool fIsGood; | 109 bool fIsGood; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 | 112 |
| 113 #endif | 113 #endif |
| OLD | NEW |