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
This commit is contained in:
parent
fffa16cc27
commit
7874dc8e71
@ -48,13 +48,6 @@ public:
|
||||
*/
|
||||
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 @@ public:
|
||||
* 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
|
||||
|
@ -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 @@ bool SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels, size_t r
|
||||
}
|
||||
return this->getPixels(info, pixels, rowBytes, NULL, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool SkImageGenerator::getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
|
||||
SkYUVColorSpace* colorSpace) {
|
||||
|
@ -64,11 +64,7 @@ bool SkDiscardablePixelRef::onNewLockPixels(LockRec* rec) {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user