remove obsolete code for SK_SUPPORT_LEGACY_IMAGEGENERATORAPI
BUG=skia:
R=reed@google.com
Author: reed@chromium.org
Review URL: https://codereview.chromium.org/613933002
diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
index fc6b1b4..cd6c373 100644
--- a/include/core/SkImageGenerator.h
+++ b/include/core/SkImageGenerator.h
@@ -48,13 +48,6 @@
*/
virtual ~SkImageGenerator() { }
-#ifdef SK_SUPPORT_LEGACY_IMAGEGENERATORAPI
- virtual SkData* refEncodedData() { return this->onRefEncodedData(); }
- virtual bool getInfo(SkImageInfo* info) { return this->onGetInfo(info); }
- virtual bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) {
- return this->onGetPixels(info, pixels, rowBytes, NULL, NULL);
- }
-#else
/**
* Return a ref to the encoded (i.e. compressed) representation,
* of this data.
@@ -108,7 +101,6 @@
* Simplified version of getPixels() that asserts that info is NOT kIndex8_SkColorType.
*/
bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
-#endif
/**
* If planes or rowBytes is NULL or if any entry in planes is NULL or if any entry in rowBytes
diff --git a/src/core/SkImageGenerator.cpp b/src/core/SkImageGenerator.cpp
index c062978..0f63db5 100644
--- a/src/core/SkImageGenerator.cpp
+++ b/src/core/SkImageGenerator.cpp
@@ -7,7 +7,6 @@
#include "SkImageGenerator.h"
-#ifndef SK_SUPPORT_LEGACY_IMAGEGENERATORAPI
bool SkImageGenerator::getInfo(SkImageInfo* info) {
SkImageInfo dummy;
if (NULL == info) {
@@ -55,7 +54,6 @@
}
return this->getPixels(info, pixels, rowBytes, NULL, NULL);
}
-#endif
bool SkImageGenerator::getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
SkYUVColorSpace* colorSpace) {
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp
index ec8d5ea..c4e3654 100644
--- a/src/lazy/SkDiscardablePixelRef.cpp
+++ b/src/lazy/SkDiscardablePixelRef.cpp
@@ -64,11 +64,7 @@
SkPMColor colors[256];
int colorCount = 0;
-#ifdef SK_SUPPORT_LEGACY_IMAGEGENERATORAPI
- if (!fGenerator->getPixels(info, pixels, fRowBytes)) {
-#else
if (!fGenerator->getPixels(info, pixels, fRowBytes, colors, &colorCount)) {
-#endif
fDiscardableMemory->unlock();
SkDELETE(fDiscardableMemory);
fDiscardableMemory = NULL;