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

Unified Diff: include/codec/SkCodec.h

Issue 1029423005: SkCodec: conditionally remove fInfo (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 | « no previous file | src/codec/SkCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/codec/SkCodec.h
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index 7337006769e13afdb72d77ccc1f8ea77e1d5c7af..cbfceb395be75147fa80e5575b37f34c721586ad 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -109,7 +109,11 @@ protected:
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;
@@ -156,7 +160,9 @@ 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;
« no previous file with comments | « no previous file | src/codec/SkCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698