remove dead code behind BOOL_ONGETINFO

need this to land in chrome first https://codereview.chromium.org/1125573002

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1123473004
This commit is contained in:
reed 2015-05-05 11:36:02 -07:00 committed by Commit bot
parent 002653e78c
commit d1290843c3
8 changed files with 0 additions and 82 deletions

View File

@ -111,25 +111,9 @@ public:
protected:
SkCodec(const SkImageInfo&, SkStream*);
/**
* The SkAlphaType is a conservative answer. i.e. it is possible that it
* initially returns a non-opaque answer, but completing the decode
* reveals that the image is actually opaque.
*/
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
bool onGetInfo(SkImageInfo* info) override {
*info = fInfo;
return true;
}
#endif
virtual SkISize onGetScaledDimensions(float /* desiredScale */) const {
// By default, scaling is not supported.
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
return fInfo.dimensions();
#else
return this->getInfo().dimensions();
#endif
}
virtual SkEncodedFormat onGetEncodedFormat() const = 0;
@ -194,9 +178,6 @@ protected:
}
private:
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
const SkImageInfo fInfo;
#endif // SK_SUPPORT_LEGACY_BOOL_ONGETINFO
SkAutoTDelete<SkStream> fStream;
bool fNeedsRewind;
SkAutoTDelete<SkScanlineDecoder> fScanlineDecoder;

View File

@ -67,17 +67,7 @@ public:
/**
* Return the ImageInfo associated with this generator.
*/
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
SkImageInfo getInfo();
bool getInfo(SkImageInfo* info) {
if (info) {
*info = this->getInfo();
}
return true;
}
#else
const SkImageInfo& getInfo() const { return fInfo; }
#endif
/**
* Used to describe the result of a call to getPixels().
@ -210,10 +200,6 @@ public:
static SkImageGenerator* NewFromData(SkData*);
protected:
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
SkImageGenerator() : fInfo(SkImageInfo::MakeUnknown(0, 0) ) {}
virtual bool onGetInfo(SkImageInfo* info);
#endif
SkImageGenerator(const SkImageInfo& info) : fInfo(info) {}
virtual SkData* onRefEncodedData();

View File

@ -71,9 +71,6 @@ SkCodec* SkCodec::NewFromData(SkData* data) {
SkCodec::SkCodec(const SkImageInfo& info, SkStream* stream)
: INHERITED(info)
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
, fInfo(info)
#endif
, fStream(stream)
, fNeedsRewind(false)
{}

View File

@ -7,16 +7,6 @@
#include "SkImageGenerator.h"
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
SkImageInfo SkImageGenerator::getInfo() {
SkImageInfo info;
if (!this->onGetInfo(&info)) {
info = SkImageInfo::MakeUnknown(0, 0);
}
return info;
}
#endif
SkImageGenerator::Result SkImageGenerator::getPixels(const SkImageInfo& info, void* pixels,
size_t rowBytes, const Options* options,
SkPMColor ctable[], int* ctableCount) {
@ -122,15 +112,6 @@ SkData* SkImageGenerator::onRefEncodedData() {
return NULL;
}
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
bool SkImageGenerator::onGetInfo(SkImageInfo* info) {
if (info) {
*info = fInfo;
}
return true;
}
#endif
#ifdef SK_SUPPORT_LEGACY_OPTIONLESS_GET_PIXELS
SkImageGenerator::Result SkImageGenerator::onGetPixels(const SkImageInfo&, void*, size_t,
SkPMColor*, int*) {

View File

@ -38,12 +38,6 @@ public:
protected:
SkData* onRefEncodedData() override;
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
bool onGetInfo(SkImageInfo* info) override {
*info = fInfo;
return true;
}
#endif
Result onGetPixels(const SkImageInfo& info,
void* pixels, size_t rowBytes, const Options&,
SkPMColor ctable[], int* ctableCount) override;

View File

@ -47,13 +47,6 @@ protected:
return SkRef(fData.get());
}
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
virtual bool onGetInfo(SkImageInfo* info) override {
*info = fInfo;
return true;
}
#endif
virtual Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
const Options&,
SkPMColor ctableEntries[], int* ctableCount) override {

View File

@ -182,14 +182,6 @@ protected:
kOpaque_SkAlphaType);
}
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
bool onGetInfo(SkImageInfo* info) override {
REPORTER_ASSERT(fReporter, info);
*info = GetMyInfo();
return true;
}
#endif
virtual Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
const Options&,
SkPMColor ctable[], int* ctableCount) override {

View File

@ -22,12 +22,6 @@ class FailureImageGenerator : public SkImageGenerator {
public:
FailureImageGenerator() : SkImageGenerator(SkImageInfo::MakeN32Premul(100, 100)) {}
protected:
#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
bool onGetInfo(SkImageInfo* info) override {
*info = SkImageInfo::MakeN32Premul(100, 100);
return true;
}
#endif
// default onGetPixels() returns kUnimplemented, which is what we want.
};