| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 return false; | 119 return false; |
| 120 } | 120 } |
| 121 | 121 |
| 122 return true; | 122 return true; |
| 123 } | 123 } |
| 124 | 124 |
| 125 | 125 |
| 126 //////////////////////////////////////////////////////////////// | 126 //////////////////////////////////////////////////////////////// |
| 127 | 127 |
| 128 const char* SkDifferentPixelsImageDiffer::getName() { | 128 const char* SkDifferentPixelsImageDiffer::getName() { |
| 129 return "Find Different Pixels"; | 129 return "different_pixels"; |
| 130 } | 130 } |
| 131 | 131 |
| 132 int SkDifferentPixelsImageDiffer::queueDiff(SkBitmap * baseline, SkBitmap * test
) { | 132 int SkDifferentPixelsImageDiffer::queueDiff(SkBitmap * baseline, SkBitmap * test
) { |
| 133 int diffID = fQueuedDiffs.count(); | 133 int diffID = fQueuedDiffs.count(); |
| 134 double startTime = get_seconds(); | 134 double startTime = get_seconds(); |
| 135 QueuedDiff* diff = fQueuedDiffs.push(); | 135 QueuedDiff* diff = fQueuedDiffs.push(); |
| 136 | 136 |
| 137 // Ensure the images are comparable | 137 // Ensure the images are comparable |
| 138 if (baseline->width() != test->width() || baseline->height() != test->height
() || | 138 if (baseline->width() != test->width() || baseline->height() != test->height
() || |
| 139 baseline->width() <= 0 || baseline->height() <= 0) { | 139 baseline->width() <= 0 || baseline->height() <= 0) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 } | 201 } |
| 202 | 202 |
| 203 | 203 |
| 204 bool SkDifferentPixelsImageDiffer::onInit() { | 204 bool SkDifferentPixelsImageDiffer::onInit() { |
| 205 if (!loadKernelFile("experimental/skpdiff/diff_pixels.cl", "diff", &fKernel)
) { | 205 if (!loadKernelFile("experimental/skpdiff/diff_pixels.cl", "diff", &fKernel)
) { |
| 206 return false; | 206 return false; |
| 207 } | 207 } |
| 208 | 208 |
| 209 return true; | 209 return true; |
| 210 } | 210 } |
| OLD | NEW |