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

Unified Diff: src/images/SkDecodingImageGenerator.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/core/SkImageGenerator.cpp ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkDecodingImageGenerator.cpp
diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp
index 170397dda15c01103395df0c42312028237485ad..337a96407b86b675ff227319b9ac98ac4d1c9c57 100644
--- a/src/images/SkDecodingImageGenerator.cpp
+++ b/src/images/SkDecodingImageGenerator.cpp
@@ -38,10 +38,12 @@ public:
protected:
SkData* onRefEncodedData() SK_OVERRIDE;
+#ifdef SK_SUPPORT_LEGACY_BOOL_ONGETINFO
bool onGetInfo(SkImageInfo* info) SK_OVERRIDE {
*info = fInfo;
return true;
}
+#endif
virtual Result onGetPixels(const SkImageInfo& info,
void* pixels, size_t rowBytes, const Options&,
SkPMColor ctable[], int* ctableCount) SK_OVERRIDE;
@@ -116,7 +118,8 @@ DecodingImageGenerator::DecodingImageGenerator(
const SkImageInfo& info,
int sampleSize,
bool ditherImage)
- : fData(data)
+ : INHERITED(info)
+ , fData(data)
, fStream(stream)
, fInfo(info)
, fSampleSize(sampleSize)
« no previous file with comments | « src/core/SkImageGenerator.cpp ('k') | src/lazy/SkCachingPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698