aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPostConfig.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-16 15:16:18 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-16 15:16:18 +0000
commit0ac6af49975c54c2debf41e9200af416ecd2d973 (patch)
tree79ee2038a2b5c994f688f30f9770310555dcc6bf /include/core/SkPostConfig.h
parent6f54724c11ab739fa0d6deff1d4b564596fe3970 (diff)
Wrap GrEffects in GrEffectPtr.
This is the first step towards automatic recycling of scratch resouces in the cache via ref-cnts. R=robertphillips@google.com Review URL: https://codereview.appspot.com/7092061 git-svn-id: http://skia.googlecode.com/svn/trunk@7222 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkPostConfig.h')
-rw-r--r--include/core/SkPostConfig.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index 128cfa4dc3..14a4a45f2d 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -92,14 +92,14 @@
///////////////////////////////////////////////////////////////////////////////
#ifndef SkNEW
- #define SkNEW(type_name) new type_name
- #define SkNEW_ARGS(type_name, args) new type_name args
- #define SkNEW_ARRAY(type_name, count) new type_name[count]
- #define SkNEW_PLACEMENT(buf, type_name) new (buf) type_name
+ #define SkNEW(type_name) (new type_name)
+ #define SkNEW_ARGS(type_name, args) (new type_name args)
+ #define SkNEW_ARRAY(type_name, count) (new type_name[(count)])
+ #define SkNEW_PLACEMENT(buf, type_name) (new (buf) type_name)
#define SkNEW_PLACEMENT_ARGS(buf, type_name, args) \
- new (buf) type_name args
- #define SkDELETE(obj) delete obj
- #define SkDELETE_ARRAY(array) delete[] array
+ (new (buf) type_name args)
+ #define SkDELETE(obj) (delete (obj))
+ #define SkDELETE_ARRAY(array) (delete[] (array))
#endif
#ifndef SK_CRASH