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

Unified Diff: tools/skpdiff/skpdiff_main.cpp

Issue 19671002: migrate skpdiff to tools (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: i shake my fist at Visual Studio's default use of tabs 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 | « tools/skpdiff/generate_pmetric_tables.py ('k') | tools/skpdiff/skpdiff_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpdiff/skpdiff_main.cpp
diff --git a/experimental/skpdiff/main.cpp b/tools/skpdiff/skpdiff_main.cpp
similarity index 93%
rename from experimental/skpdiff/main.cpp
rename to tools/skpdiff/skpdiff_main.cpp
index d258c147c62015e1f41968e41eb449dc71f6cce2..a5753937d296f4073909670bd0170a6378bf8b36 100644
--- a/experimental/skpdiff/main.cpp
+++ b/tools/skpdiff/skpdiff_main.cpp
@@ -6,9 +6,16 @@
*/
#if SK_SUPPORT_OPENCL
+
#define __NO_STD_VECTOR // Uses cl::vectpr instead of std::vectpr
#define __NO_STD_STRING // Uses cl::STRING_CLASS instead of std::string
-#include <CL/cl.hpp>
+#if SK_BUILD_FOR_MAC
+// Note that some macs don't have this header and it can be downloaded from the Khronos registry
+# include <OpenCL/cl.hpp>
+#else
+# include <CL/cl.hpp>
+#endif
+
#endif
#include "SkCommandLineFlags.h"
@@ -35,7 +42,7 @@ DEFINE_bool(jsonp, true, "Output JSON with padding");
#if SK_SUPPORT_OPENCL
/// A callback for any OpenCL errors
-CL_CALLBACK void error_notify(const char* errorInfo, const void* privateInfoSize, ::size_t cb, void* userData) {
+static void CL_CALLBACK error_notify(const char* errorInfo, const void* privateInfoSize, ::size_t cb, void* userData) {
SkDebugf("OpenCL error notify: %s\n", errorInfo);
exit(1);
}
@@ -55,8 +62,8 @@ static bool init_device_and_context(cl::Device* device, cl::Context* context) {
// Query for a device
cl::vector<cl::Device> deviceList;
- platform.getDevices(CL_DEVICE_TYPE_GPU, &deviceList);
- SkDebugf("The number of GPU devices is %u\n", deviceList.size());
+ platform.getDevices(CL_DEVICE_TYPE_ALL, &deviceList);
+ SkDebugf("The number of devices is %u\n", deviceList.size());
// Print some information about the device for debugging
*device = deviceList[0];
« no previous file with comments | « tools/skpdiff/generate_pmetric_tables.py ('k') | tools/skpdiff/skpdiff_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698