aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-01 20:27:53 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-01 20:27:53 +0000
commit9b24d25c6b7ddde5788444f17fa3bfad19096f37 (patch)
treedd00db0d2ae6e024b55f1812db571026488b9d01 /gpu
parentab0ab4a601356160f2e49d7935ddd0f559a848e2 (diff)
include SkTypes.h
git-svn-id: http://skia.googlecode.com/svn/trunk@1474 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu')
-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);