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 { |
mtklein
2013/11/06 14:24:36
This doesn't seem like a particularly good interfa
djsollen
2013/11/06 15:01:58
Agreed. Is it Ok if I do this refactor in a second
mtklein
2013/11/06 15:09:41
Given how much of this CL becomes moot, I'd person
| |
18 public: | 18 public: |
19 SkImageDiffer(); | 19 SkImageDiffer(); |
20 virtual ~SkImageDiffer(); | 20 virtual ~SkImageDiffer(); |
21 | 21 |
22 /** | 22 /** |
23 * Gets a unique and descriptive name of this differ | 23 * Gets a unique and descriptive name of this differ |
24 * @return A statically allocated null terminated string that is the name of this differ | 24 * @return A statically allocated null terminated string that is the name of this differ |
25 */ | 25 */ |
26 virtual const char* getName() = 0; | 26 virtual const char* getName() = 0; |
27 | 27 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 * Gets an array of the points of interest for the diff of the given id. The results are only | 84 * Gets an array of the points of interest for the diff of the given id. The results are only |
85 * meaningful after the queued diff has finished. | 85 * meaningful after the queued diff has finished. |
86 * @param id The id of the queued diff to query | 86 * @param id The id of the queued diff to query |
87 */ | 87 */ |
88 virtual SkIPoint* getPointsOfInterest(int id) = 0; | 88 virtual SkIPoint* getPointsOfInterest(int id) = 0; |
89 | 89 |
90 | 90 |
91 | 91 |
92 protected: | 92 protected: |
93 bool fIsGood; | 93 bool fIsGood; |
94 | |
95 // Used to ensure that only one thread is able to queue new entries at a tim e | |
96 SkMutex fQueueMutex; | |
mtklein
2013/11/06 14:24:36
Pretty weird to have this on the base class.
| |
94 }; | 97 }; |
95 | 98 |
96 | 99 |
97 #endif | 100 #endif |
OLD | NEW |