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

Unified Diff: src/codec/SkRawCodec.cpp

Issue 1895383002: Revert of Add SkEncodedInfo to report properties of encoded image data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/codec/SkPngCodec.cpp ('k') | src/codec/SkWbmpCodec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkRawCodec.cpp
diff --git a/src/codec/SkRawCodec.cpp b/src/codec/SkRawCodec.cpp
index 51de2fcec02bd12b9a5a68faefc5add1011001e7..ef8ba700a46b22130bdfd262b610e2b66e1c72ee 100644
--- a/src/codec/SkRawCodec.cpp
+++ b/src/codec/SkRawCodec.cpp
@@ -515,16 +515,8 @@
}
}
- const SkEncodedInfo& getEncodedInfo() const {
- return fEncodedInfo;
- }
-
- int width() const {
- return fWidth;
- }
-
- int height() const {
- return fHeight;
+ const SkImageInfo& getImageInfo() const {
+ return fImageInfo;
}
bool isScalable() const {
@@ -553,11 +545,8 @@
return 0x2A == get_endian_short(header + 2, littleEndian);
}
- void init(int width, int height, const dng_point& cfaPatternSize) {
- fWidth = width;
- fHeight = height;
- fEncodedInfo = SkEncodedInfo::Make(SkEncodedInfo::kRGB_Color,
- SkEncodedInfo::kOpaque_Alpha, 8);
+ void init(const int width, const int height, const dng_point& cfaPatternSize) {
+ fImageInfo = SkImageInfo::Make(width, height, kN32_SkColorType, kOpaque_SkAlphaType);
// The DNG SDK scales only during demosaicing, so scaling is only possible when
// a mosaic info is available.
@@ -627,9 +616,7 @@
SkAutoTDelete<dng_negative> fNegative;
SkAutoTDelete<dng_stream> fDngStream;
- int fWidth;
- int fHeight;
- SkEncodedInfo fEncodedInfo;
+ SkImageInfo fImageInfo;
bool fIsScalable;
bool fIsXtransImage;
};
@@ -777,5 +764,5 @@
SkRawCodec::~SkRawCodec() {}
SkRawCodec::SkRawCodec(SkDngImage* dngImage)
- : INHERITED(dngImage->width(), dngImage->height(), dngImage->getEncodedInfo(), nullptr)
+ : INHERITED(dngImage->getImageInfo(), nullptr)
, fDngImage(dngImage) {}
« no previous file with comments | « src/codec/SkPngCodec.cpp ('k') | src/codec/SkWbmpCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698