aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar mdempsky <mdempsky@chromium.org>2015-09-22 06:10:35 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-22 06:10:35 -0700
commit106b12427e642d067dd5b48664eb693653853583 (patch)
treed70686c724a895ae98e04574d432c0eecef030f5 /include/core
parent55fb4f3fdaa301c1c251259fedff4ab0b958c23b (diff)
Remove SkNEW and SkDELETE macros
This CL removes the uses of SkNEW that have resprouted since commit 385fe4d, and removes the macros entirely now that Android and Chromium have been cleaned up to no longer depend on them. A bunch of files implicitly depend on #include <new> from SkPostConfig.h still though, so keep that for now. To be fixed in a followup CL. [mtklein mucking around] Only public API removed. TBR=reed@google.com Review URL: https://codereview.chromium.org/1360653004
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkImageGenerator.h6
-rw-r--r--include/core/SkPostConfig.h12
2 files changed, 5 insertions, 13 deletions
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index fdafa0b87b..b91aa653a5 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -30,9 +30,9 @@ class SkPicture;
* If generator is NULL, will safely return false.
*
* If this fails or when the SkDiscardablePixelRef that is
- * installed into destination is destroyed, it will call
- * SkDELETE() on the generator. Therefore, generator should be
- * allocated with SkNEW() or SkNEW_ARGS().
+ * installed into destination is destroyed, it will
+ * delete the generator. Therefore, generator should be
+ * allocated with new.
*
* @param destination Upon success, this bitmap will be
* configured and have a pixelref installed.
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index f4ce102858..f228937305 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -100,16 +100,8 @@
///////////////////////////////////////////////////////////////////////////////
-#ifndef SkNEW
-# include <new>
-# 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))
-#endif
+// TODO(mdempsky): Move elsewhere as appropriate.
+#include <new>
#ifndef SK_CRASH
# ifdef SK_BUILD_FOR_WIN