Index: src/core/SkImageCacherator.cpp |
diff --git a/src/core/SkImageCacherator.cpp b/src/core/SkImageCacherator.cpp |
index b225612a17f77ab1f7f2f88b3692fcb6475adbba..1f481d0000cf9a97bcd8e03b2ac27892d3045cd0 100644 |
--- a/src/core/SkImageCacherator.cpp |
+++ b/src/core/SkImageCacherator.cpp |
@@ -19,10 +19,17 @@ |
#include "SkGrPriv.h" |
#endif |
+SkImageCacherator* SkImageCacherator::NewFromGenerator(SkImageGenerator* gen) { |
+ if (!gen) { |
+ return nullptr; |
+ } |
+ return SkNEW_ARGS(SkImageCacherator, (gen)); |
+} |
+ |
SkImageCacherator::SkImageCacherator(SkImageGenerator* gen) : fGenerator(gen) {} |
SkImageCacherator::~SkImageCacherator() { |
- delete fGenerator; |
+ SkDELETE(fGenerator); |
} |
static bool check_output_bitmap(const SkBitmap& bitmap, uint32_t expectedID) { |