aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/include/GrTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/include/GrTypes.h')
-rw-r--r--gpu/include/GrTypes.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/gpu/include/GrTypes.h b/gpu/include/GrTypes.h
index d09ac75aa7..9348375987 100644
--- a/gpu/include/GrTypes.h
+++ b/gpu/include/GrTypes.h
@@ -18,11 +18,9 @@
#ifndef GrTypes_DEFINED
#define GrTypes_DEFINED
+#include "SkTypes.h"
#include "GrConfig.h"
-#include <memory.h>
-#include <string.h>
-
////////////////////////////////////////////////////////////////////////////////
/**
@@ -53,7 +51,7 @@
* Macro to round n up to the next multiple of 4, or return it unchanged if
* n is already a multiple of 4
*/
-#define GrALIGN4(n) (((n) + 3) >> 2 << 2)
+#define GrALIGN4(n) SkAlign4(n)
#define GrIsALIGN4(n) (((n) & 3) == 0)
template <typename T> const T& GrMin(const T& a, const T& b) {
@@ -111,7 +109,7 @@ static inline uint32_t GrSizeAlignDown(size_t x, uint32_t alignment) {
/**
* Count elements in an array
*/
-#define GR_ARRAY_COUNT(array) (sizeof(array) / sizeof(array[0]))
+#define GR_ARRAY_COUNT(array) SK_ARRAY_COUNT(array)
//!< allocate a block of memory, will never return NULL
extern void* GrMalloc(size_t bytes);