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

Side by Side Diff: experimental/skpdiff/SkCLImageDiffer.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 | « no previous file | experimental/skpdiff/SkCLImageDiffer.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 SkCLImageDiffer_DEFINED 8 #ifndef SkCLImageDiffer_DEFINED
9 #define SkCLImageDiffer_DEFINED 9 #define SkCLImageDiffer_DEFINED
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 }; 86 };
87 87
88 /** 88 /**
89 * A OpenCL differ that measures the percentage of different corresponding pixel s. If the two images 89 * A OpenCL differ that measures the percentage of different corresponding pixel s. If the two images
90 * are not the same size or have no pixels, the result will always be zero. 90 * are not the same size or have no pixels, the result will always be zero.
91 */ 91 */
92 class SkDifferentPixelsImageDiffer : public SkCLImageDiffer { 92 class SkDifferentPixelsImageDiffer : public SkCLImageDiffer {
93 public: 93 public:
94 virtual const char* getName() SK_OVERRIDE; 94 virtual const char* getName() SK_OVERRIDE;
95 virtual int queueDiff(SkBitmap* baseline, SkBitmap* test) SK_OVERRIDE; 95 virtual int queueDiff(SkBitmap* baseline, SkBitmap* test) SK_OVERRIDE;
96 virtual void deleteDiff(int id) SK_OVERRIDE;
96 virtual bool isFinished(int id) SK_OVERRIDE; 97 virtual bool isFinished(int id) SK_OVERRIDE;
97 virtual double getResult(int id) SK_OVERRIDE; 98 virtual double getResult(int id) SK_OVERRIDE;
99 virtual int getPointsOfInterestCount(int id) SK_OVERRIDE;
100 virtual SkIPoint* getPointsOfInterest(int id) SK_OVERRIDE;
98 101
99 protected: 102 protected:
100 virtual bool onInit() SK_OVERRIDE; 103 virtual bool onInit() SK_OVERRIDE;
101 104
102 private: 105 private:
103 struct QueuedDiff { 106 struct QueuedDiff;
104 bool finished;
105 double result;
106 cl_mem baseline;
107 cl_mem test;
108 cl_mem resultsBuffer;
109 };
110 107
111 SkTDArray<QueuedDiff> fQueuedDiffs; 108 SkTDArray<QueuedDiff> fQueuedDiffs;
112 cl_kernel fKernel; 109 cl_kernel fKernel;
113 110
114 typedef SkCLImageDiffer INHERITED; 111 typedef SkCLImageDiffer INHERITED;
115 }; 112 };
116 113
117 #endif 114 #endif
OLDNEW
« no previous file with comments | « no previous file | experimental/skpdiff/SkCLImageDiffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698