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

Side by Side Diff: tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp

Issue 29103005: update skpdiff visualization (image magnification with alpha mask) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | « tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp ('k') | tools/skpdiff/SkImageDiffer.h » ('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 #include "SkBitmap.h" 8 #include "SkBitmap.h"
9 9
10 #include "SkDifferentPixelsMetric.h" 10 #include "SkDifferentPixelsMetric.h"
(...skipping 29 matching lines...) Expand all
40 cl_mem baseline; 40 cl_mem baseline;
41 cl_mem test; 41 cl_mem test;
42 cl_mem resultsBuffer; 42 cl_mem resultsBuffer;
43 cl_mem poiBuffer; 43 cl_mem poiBuffer;
44 }; 44 };
45 45
46 const char* SkDifferentPixelsMetric::getName() { 46 const char* SkDifferentPixelsMetric::getName() {
47 return "different_pixels"; 47 return "different_pixels";
48 } 48 }
49 49
50 bool SkDifferentPixelsMetric::enablePOIAlphaMask() {
51 return false;
52 }
53
50 int SkDifferentPixelsMetric::queueDiff(SkBitmap* baseline, SkBitmap* test) { 54 int SkDifferentPixelsMetric::queueDiff(SkBitmap* baseline, SkBitmap* test) {
51 int diffID = fQueuedDiffs.count(); 55 int diffID = fQueuedDiffs.count();
52 double startTime = get_seconds(); 56 double startTime = get_seconds();
53 QueuedDiff* diff = fQueuedDiffs.push(); 57 QueuedDiff* diff = fQueuedDiffs.push();
54 58
55 // If we never end up running the kernel, include some safe defaults in the result. 59 // If we never end up running the kernel, include some safe defaults in the result.
56 diff->finished = false; 60 diff->finished = false;
57 diff->result = -1.0; 61 diff->result = -1.0;
58 diff->numDiffPixels = 0; 62 diff->numDiffPixels = 0;
59 diff->poi = NULL; 63 diff->poi = NULL;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return fQueuedDiffs[id].poi; 165 return fQueuedDiffs[id].poi;
162 } 166 }
163 167
164 bool SkDifferentPixelsMetric::onInit() { 168 bool SkDifferentPixelsMetric::onInit() {
165 if (!this->loadKernelSource(kDifferentPixelsKernelSource, "diff", &fKernel)) { 169 if (!this->loadKernelSource(kDifferentPixelsKernelSource, "diff", &fKernel)) {
166 return false; 170 return false;
167 } 171 }
168 172
169 return true; 173 return true;
170 } 174 }
OLDNEW
« no previous file with comments | « tools/skpdiff/SkDifferentPixelsMetric_cpu.cpp ('k') | tools/skpdiff/SkImageDiffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698