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: include/core/SkPostConfig.h

Issue 1427663002: Make SK_PREFETCH work on Windows too. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: actually, SSE1 Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 // IWYU pragma: private, include "SkTypes.h" 8 // IWYU pragma: private, include "SkTypes.h"
9 9
10 #ifndef SkPostConfig_DEFINED 10 #ifndef SkPostConfig_DEFINED
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 #if defined(SK_BUILD_FOR_WIN) 288 #if defined(SK_BUILD_FOR_WIN)
289 #define SK_VECTORCALL __vectorcall 289 #define SK_VECTORCALL __vectorcall
290 #elif defined(SK_CPU_ARM32) 290 #elif defined(SK_CPU_ARM32)
291 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp"))) 291 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp")))
292 #else 292 #else
293 #define SK_VECTORCALL 293 #define SK_VECTORCALL
294 #endif 294 #endif
295 295
296 ////////////////////////////////////////////////////////////////////// 296 //////////////////////////////////////////////////////////////////////
297 297
298 #if defined(__clang__) || defined(__GNUC__) 298 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
299 # define SK_PREFETCH(ptr) __builtin_prefetch(ptr) 299 #define SK_PREFETCH(ptr) _mm_prefetch(ptr, _MM_HINT_T0)
300 # define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1) 300 #define SK_WRITE_PREFETCH(ptr) _mm_prefetch(ptr, _MM_HINT_T0)
301 #elif defined(__GNUC__)
Stephen White 2015/10/27 20:03:20 We don't need "define(__clang__) ||" here anymore?
mtklein 2015/10/27 20:05:55 Nah, Clang defines __GNUC__. Seemed confusing to
302 #define SK_PREFETCH(ptr) __builtin_prefetch(ptr)
303 #define SK_WRITE_PREFETCH(ptr) __builtin_prefetch(ptr, 1)
301 #else 304 #else
302 # define SK_PREFETCH(ptr) 305 #define SK_PREFETCH(ptr)
303 # define SK_WRITE_PREFETCH(ptr) 306 #define SK_WRITE_PREFETCH(ptr)
304 #endif 307 #endif
305 308
306 ////////////////////////////////////////////////////////////////////// 309 //////////////////////////////////////////////////////////////////////
307 310
308 #ifndef SK_PRINTF_LIKE 311 #ifndef SK_PRINTF_LIKE
309 # if defined(__clang__) || defined(__GNUC__) 312 # if defined(__clang__) || defined(__GNUC__)
310 # define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B)))) 313 # define SK_PRINTF_LIKE(A, B) __attribute__((format(printf, (A), (B))))
311 # else 314 # else
312 # define SK_PRINTF_LIKE(A, B) 315 # define SK_PRINTF_LIKE(A, B)
313 # endif 316 # endif
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 # define SK_GAMMA_EXPONENT (2.2f) 352 # define SK_GAMMA_EXPONENT (2.2f)
350 #endif 353 #endif
351 354
352 ////////////////////////////////////////////////////////////////////// 355 //////////////////////////////////////////////////////////////////////
353 356
354 #ifndef GR_TEST_UTILS 357 #ifndef GR_TEST_UTILS
355 # define GR_TEST_UTILS 1 358 # define GR_TEST_UTILS 1
356 #endif 359 #endif
357 360
358 #endif // SkPostConfig_DEFINED 361 #endif // SkPostConfig_DEFINED
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698