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

Unified Diff: include/core/SkTypes.h

Issue 1755293002: update SkSmallAllocator to force internal allocations to be 16-byte aligned (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | src/core/SkSmallAllocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTypes.h
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 5831ba3e80fa1093e681f20341ba3a7ef43e3d82..b9e519195598de44a66a0b407984c2410ed2d30b 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -337,6 +337,9 @@ template <typename T, size_t N> char (&SkArrayCountHelper(T (&array)[N]))[N];
#define SkAlign8(x) (((x) + 7) >> 3 << 3)
#define SkIsAlign8(x) (0 == ((x) & 7))
+#define SkAlign16(x) (((x) + 15) >> 4 << 4)
+#define SkIsAlign16(x) (0 == ((x) & 15))
+
#define SkAlignPtr(x) (sizeof(void*) == 8 ? SkAlign8(x) : SkAlign4(x))
#define SkIsAlignPtr(x) (sizeof(void*) == 8 ? SkIsAlign8(x) : SkIsAlign4(x))
« no previous file with comments | « no previous file | src/core/SkSmallAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698