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

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

Issue 325413003: rebaseline_server: use just skpdiff, not Python Image Library (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: attempt to fix "'abs' : ambiguous call to overloaded function" on Windows Created 6 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
« 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 18 matching lines...) Expand all
29 " \n" 29 " \n"
30 " atomic_inc(result); \n" 30 " atomic_inc(result); \n"
31 " // TODO: generate alpha mask \n" 31 " // TODO: generate alpha mask \n"
32 " } \n" 32 " } \n"
33 "} \n"; 33 "} \n";
34 34
35 const char* SkDifferentPixelsMetric::getName() const { 35 const char* SkDifferentPixelsMetric::getName() const {
36 return "different_pixels"; 36 return "different_pixels";
37 } 37 }
38 38
39 bool SkDifferentPixelsMetric::diff(SkBitmap* baseline, SkBitmap* test, bool comp uteMask, 39 bool SkDifferentPixelsMetric::diff(SkBitmap* baseline, SkBitmap* test, bool comp uteAlphaMask,
40 bool computeRgbDiff, bool computeWhiteDiff,
40 Result* result) const { 41 Result* result) const {
41 double startTime = get_seconds(); 42 double startTime = get_seconds();
42 43
43 if (!fIsGood) { 44 if (!fIsGood) {
44 return false; 45 return false;
45 } 46 }
46 47
47 // If we never end up running the kernel, include some safe defaults in the result. 48 // If we never end up running the kernel, include some safe defaults in the result.
48 result->poiCount = 0; 49 result->poiCount = 0;
49 50
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return true; 112 return true;
112 } 113 }
113 114
114 bool SkDifferentPixelsMetric::onInit() { 115 bool SkDifferentPixelsMetric::onInit() {
115 if (!this->loadKernelSource(kDifferentPixelsKernelSource, "diff", &fKernel)) { 116 if (!this->loadKernelSource(kDifferentPixelsKernelSource, "diff", &fKernel)) {
116 return false; 117 return false;
117 } 118 }
118 119
119 return true; 120 return true;
120 } 121 }
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