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

Unified Diff: experimental/skpdiff/diff_pixels.cl

Issue 19374006: make OpenCL optional for skpdiff (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: this-> 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/skpdiff/SkImageDiffer.h ('k') | experimental/skpdiff/main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/skpdiff/diff_pixels.cl
diff --git a/experimental/skpdiff/diff_pixels.cl b/experimental/skpdiff/diff_pixels.cl
deleted file mode 100644
index 1eed2a4216a0bfc8dc67dd2907c456bfa827aaba..0000000000000000000000000000000000000000
--- a/experimental/skpdiff/diff_pixels.cl
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#pragma OPENCL_EXTENSION cl_khr_global_int32_base_atomics
-
-const sampler_t gInSampler = CLK_NORMALIZED_COORDS_FALSE |
- CLK_ADDRESS_CLAMP_TO_EDGE |
- CLK_FILTER_NEAREST;
-
-__kernel void diff(read_only image2d_t baseline, read_only image2d_t test,
- __global int* result, __global int2* poi) {
- int2 coord = (int2)(get_global_id(0), get_global_id(1));
- uint4 baselinePixel = read_imageui(baseline, gInSampler, coord);
- uint4 testPixel = read_imageui(test, gInSampler, coord);
- int4 pixelCompare = baselinePixel == testPixel;
- if (baselinePixel.x != testPixel.x ||
- baselinePixel.y != testPixel.y ||
- baselinePixel.z != testPixel.z ||
- baselinePixel.w != testPixel.w) {
-
- int poiIndex = atomic_inc(result);
- poi[poiIndex] = coord;
- }
-}
« no previous file with comments | « experimental/skpdiff/SkImageDiffer.h ('k') | experimental/skpdiff/main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698