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

Unified Diff: include/core/SkPostConfig.h

Issue 57823003: Add SK_PREFETCH and use in SkBlurImageFilter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: slimmer change 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPostConfig.h
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index 0aa6c18e31aba52229d12f03e18d9fc8f6e34262..63637e5c503df5f16f9aa1a3329c0f1bae077a3b 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -381,6 +381,15 @@
//////////////////////////////////////////////////////////////////////
+#if defined(__clang__) || defined(__GNUC__)
Nico 2013/11/12 05:23:09 clang defines __GNUC__ too, no need to check for i
+#define SK_PREFETCH(ptr) __builtin_prefetch(ptr)
+#define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1)
+#else
+#define SK_PREFETCH(ptr)
+#define SK_WRITE_PREFETCH(ptr)
+#endif
+
+//////////////////////////////////////////////////////////////////////
#ifndef SK_PRINTF_LIKE
#if defined(__clang__) || defined(__GNUC__)
#define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B))))
« no previous file with comments | « no previous file | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698