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

Side by Side Diff: include/core/SkPostConfig.h

Issue 2473143002: Use alignas to force alignment. (Closed)
Patch Set: Remove comment. Created 4 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 | src/core/SkLinearBitmapPipeline.h » ('j') | 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #endif 70 #endif
71 71
72 #if !defined(SK_ATTRIBUTE) 72 #if !defined(SK_ATTRIBUTE)
73 # if defined(__clang__) || defined(__GNUC__) 73 # if defined(__clang__) || defined(__GNUC__)
74 # define SK_ATTRIBUTE(attr) __attribute__((attr)) 74 # define SK_ATTRIBUTE(attr) __attribute__((attr))
75 # else 75 # else
76 # define SK_ATTRIBUTE(attr) 76 # define SK_ATTRIBUTE(attr)
77 # endif 77 # endif
78 #endif 78 #endif
79 79
80 // As usual, there are two ways to increase alignment... the MSVC way and the ev eryone-else way.
81 #ifndef SK_STRUCT_ALIGN
82 #ifdef _MSC_VER
83 #define SK_STRUCT_ALIGN(N) __declspec(align(N))
84 #else
85 #define SK_STRUCT_ALIGN(N) __attribute__((aligned(N)))
86 #endif
87 #endif
88
89 #if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 80 #if defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
90 #define SK_VECTORCALL __vectorcall 81 #define SK_VECTORCALL __vectorcall
91 #elif defined(SK_CPU_ARM32) && defined(SK_ARM_HAS_NEON) 82 #elif defined(SK_CPU_ARM32) && defined(SK_ARM_HAS_NEON)
92 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp"))) 83 #define SK_VECTORCALL __attribute__((pcs("aapcs-vfp")))
93 #else 84 #else
94 #define SK_VECTORCALL 85 #define SK_VECTORCALL
95 #endif 86 #endif
96 87
97 #if !defined(SK_SUPPORT_GPU) 88 #if !defined(SK_SUPPORT_GPU)
98 # define SK_SUPPORT_GPU 1 89 # define SK_SUPPORT_GPU 1
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 353
363 #ifndef SK_HISTOGRAM_BOOLEAN 354 #ifndef SK_HISTOGRAM_BOOLEAN
364 # define SK_HISTOGRAM_BOOLEAN(name, value) 355 # define SK_HISTOGRAM_BOOLEAN(name, value)
365 #endif 356 #endif
366 357
367 #ifndef SK_HISTOGRAM_ENUMERATION 358 #ifndef SK_HISTOGRAM_ENUMERATION
368 # define SK_HISTOGRAM_ENUMERATION(name, value, boundary_value) 359 # define SK_HISTOGRAM_ENUMERATION(name, value, boundary_value)
369 #endif 360 #endif
370 361
371 #endif // SkPostConfig_DEFINED 362 #endif // SkPostConfig_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkLinearBitmapPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698