Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Unified Diff: src/ports/SkImageGenerator_skia.cpp

Issue 1017293002: guarded change to SkImageGenerator to make getInfo() const (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lazy/SkDiscardablePixelRef.cpp ('k') | tests/CachedDecodingPixelRefTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkImageGenerator_skia.cpp
diff --git a/src/ports/SkImageGenerator_skia.cpp b/src/ports/SkImageGenerator_skia.cpp
index 1448d57ce57cf2f6340a71041d095a3b1a7219c0..6938880357356271eb6aab8d20f0f570946d90a1 100644
--- a/src/ports/SkImageGenerator_skia.cpp
+++ b/src/ports/SkImageGenerator_skia.cpp
@@ -39,7 +39,7 @@ class SkImageDecoderGenerator : public SkImageGenerator {
public:
SkImageDecoderGenerator(const SkImageInfo& info, SkImageDecoder* decoder, SkData* data)
- : fInfo(info), fDecoder(decoder), fData(SkRef(data))
+ : INHERITED(info), fInfo(info), fDecoder(decoder), fData(SkRef(data))
{}
protected:
@@ -47,10 +47,12 @@ protected:
return SkRef(fData.get());
}
+#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
virtual bool onGetInfo(SkImageInfo* info) SK_OVERRIDE {
*info = fInfo;
return true;
}
+#endif
virtual Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
const Options&,
@@ -92,7 +94,9 @@ protected:
SkMemoryStream stream(fData->data(), fData->size(), false);
return fDecoder->decodeYUV8Planes(&stream, sizes, planes, rowBytes, colorSpace);
}
-
+
+private:
+ typedef SkImageGenerator INHERITED;
};
SkImageGenerator* SkImageGenerator::NewFromData(SkData* data) {
« no previous file with comments | « src/lazy/SkDiscardablePixelRef.cpp ('k') | tests/CachedDecodingPixelRefTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698