Index: src/core/SkImageGenerator.cpp |
diff --git a/src/core/SkImageGenerator.cpp b/src/core/SkImageGenerator.cpp |
index 4c69fd2a0be34f344229cdc8743cd62188066786..27bc141d577c4cb03a7b44c1dc278800e46500de 100644 |
--- a/src/core/SkImageGenerator.cpp |
+++ b/src/core/SkImageGenerator.cpp |
@@ -7,13 +7,15 @@ |
#include "SkImageGenerator.h" |
-bool SkImageGenerator::getInfo(SkImageInfo* info) { |
- SkImageInfo dummy; |
- if (NULL == info) { |
- info = &dummy; |
+#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO |
+SkImageInfo SkImageGenerator::getInfo() { |
+ SkImageInfo info; |
+ if (!this->onGetInfo(&info)) { |
+ info = SkImageInfo::MakeUnknown(0, 0); |
} |
- return this->onGetInfo(info); |
+ return info; |
} |
+#endif |
SkImageGenerator::Result SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, |
size_t rowBytes, const Options* options, |
@@ -120,9 +122,11 @@ SkData* SkImageGenerator::onRefEncodedData() { |
return NULL; |
} |
+#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO |
bool SkImageGenerator::onGetInfo(SkImageInfo*) { |
return false; |
} |
+#endif |
#ifdef SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS |
SkImageGenerator::Result SkImageGenerator::onGetPixels(const SkImageInfo&, void*, size_t, |