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

Side by Side Diff: experimental/skpdiff/SkImageDiffer.h

Issue 18176005: add point of interest API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: constant zero buffer Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « experimental/skpdiff/SkCLImageDiffer.cpp ('k') | experimental/skpdiff/SkImageDiffer.cpp » ('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 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 13
13 /** 14 /**
14 * 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.
15 */ 16 */
16 class SkImageDiffer { 17 class SkImageDiffer {
17 public: 18 public:
18 SkImageDiffer(); 19 SkImageDiffer();
19 virtual ~SkImageDiffer(); 20 virtual ~SkImageDiffer();
20 21
21 /** 22 /**
(...skipping 25 matching lines...) Expand all
47 virtual int queueDiff(SkBitmap* baseline, SkBitmap* test) = 0; 48 virtual int queueDiff(SkBitmap* baseline, SkBitmap* test) = 0;
48 49
49 /** 50 /**
50 * Gets whether a queued diff of the given id has finished 51 * Gets whether a queued diff of the given id has finished
51 * @param id The id of the queued diff to query 52 * @param id The id of the queued diff to query
52 * @return True if the queued diff is finished and has results, false oth erwise 53 * @return True if the queued diff is finished and has results, false oth erwise
53 */ 54 */
54 virtual bool isFinished(int id) = 0; 55 virtual bool isFinished(int id) = 0;
55 56
56 /** 57 /**
58 * Deletes memory associated with a diff and its results. This may block exe cution until the
59 * diff is finished,
60 * @param id The id of the diff to query
61 */
62 virtual void deleteDiff(int id) = 0;
63
64 /**
57 * Gets the results of the queued diff of the given id. The results are only meaningful after 65 * Gets the results of the queued diff of the given id. The results are only meaningful after
58 * the queued diff has finished. 66 * the queued diff has finished.
59 * @param id The id of the queued diff to query 67 * @param id The id of the queued diff to query
60 * @return A score between of how different the compared images are, with lower numbers being
61 * more different.
62 */ 68 */
63 virtual double getResult(int id) = 0; 69 virtual double getResult(int id) = 0;
64 70
71 /**
72 * Gets the number of points of interest for the diff of the given id. The r esults are only
73 * meaningful after the queued diff has finished.
74 * @param id The id of the queued diff to query
75 */
76 virtual int getPointsOfInterestCount(int id) = 0;
77
78 /**
79 * Gets an array of the points of interest for the diff of the given id. The results are only
80 * meaningful after the queued diff has finished.
81 * @param id The id of the queued diff to query
82 */
83 virtual SkIPoint* getPointsOfInterest(int id) = 0;
84
85
86
65 protected: 87 protected:
66 bool fIsGood; 88 bool fIsGood;
67 }; 89 };
68 90
69 91
70 #endif 92 #endif
OLDNEW
« no previous file with comments | « experimental/skpdiff/SkCLImageDiffer.cpp ('k') | experimental/skpdiff/SkImageDiffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698