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

Side by Side Diff: experimental/skpdiff/SkPMetric.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/SkImageDiffer.cpp ('k') | experimental/skpdiff/SkPMetric.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 SkPMetric_DEFINED 8 #ifndef SkPMetric_DEFINED
9 #define SkPMetric_DEFINED 9 #define SkPMetric_DEFINED
10 10
11 #include "SkTArray.h"
11 #include "SkTDArray.h" 12 #include "SkTDArray.h"
12 13
13 #include "SkImageDiffer.h" 14 #include "SkImageDiffer.h"
14 15
15 /** 16 /**
16 * An image differ that uses the pdiff image metric to compare images. 17 * An image differ that uses the pdiff image metric to compare images.
17 */ 18 */
18 class SkPMetric : public SkImageDiffer { 19 class SkPMetric : public SkImageDiffer {
19 public: 20 public:
20 virtual const char* getName() SK_OVERRIDE; 21 virtual const char* getName() SK_OVERRIDE;
21 virtual int queueDiff(SkBitmap* baseline, SkBitmap* test) SK_OVERRIDE; 22 virtual int queueDiff(SkBitmap* baseline, SkBitmap* test) SK_OVERRIDE;
23 virtual void deleteDiff(int id) SK_OVERRIDE;
22 virtual bool isFinished(int id) SK_OVERRIDE; 24 virtual bool isFinished(int id) SK_OVERRIDE;
23 virtual double getResult(int id) SK_OVERRIDE; 25 virtual double getResult(int id) SK_OVERRIDE;
26 virtual int getPointsOfInterestCount(int id) SK_OVERRIDE;
27 virtual SkIPoint* getPointsOfInterest(int id) SK_OVERRIDE;
24 28
25 private: 29 private:
26 struct QueuedDiff { 30 struct QueuedDiff {
27 bool finished; 31 bool finished;
28 double result; 32 double result;
33 SkTDArray<SkIPoint> poi;
29 }; 34 };
30 35
31 SkTDArray<QueuedDiff> fQueuedDiffs; 36 SkTArray<QueuedDiff> fQueuedDiffs;
32 37
33 typedef SkImageDiffer INHERITED; 38 typedef SkImageDiffer INHERITED;
34 }; 39 };
35 40
36 41
37 #endif 42 #endif
OLDNEW
« no previous file with comments | « experimental/skpdiff/SkImageDiffer.cpp ('k') | experimental/skpdiff/SkPMetric.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698