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

Unified Diff: src/codec/SkWbmpCodec.cpp

Issue 1820073002: Add SkEncodedInfo to report properties of encoded image data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
Index: src/codec/SkWbmpCodec.cpp
diff --git a/src/codec/SkWbmpCodec.cpp b/src/codec/SkWbmpCodec.cpp
index 90ee322b1f64c273a93765a85cce51009cd9a843..3d398ea2ab7aa29e989878ee5c44b540eaecc847 100644
--- a/src/codec/SkWbmpCodec.cpp
+++ b/src/codec/SkWbmpCodec.cpp
@@ -104,7 +104,7 @@ bool SkWbmpCodec::readRow(uint8_t* row) {
return this->stream()->read(row, fSrcRowBytes) == fSrcRowBytes;
}
-SkWbmpCodec::SkWbmpCodec(const SkImageInfo& info, SkStream* stream)
+SkWbmpCodec::SkWbmpCodec(const SkEncodedInfo& info, SkStream* stream)
: INHERITED(info, stream)
, fSrcRowBytes(get_src_row_bytes(this->getInfo().width()))
, fSwizzler(nullptr)
@@ -166,8 +166,8 @@ SkCodec* SkWbmpCodec::NewFromStream(SkStream* stream) {
if (!read_header(stream, &size)) {
return nullptr;
}
- SkImageInfo info = SkImageInfo::Make(size.width(), size.height(),
- kGray_8_SkColorType, kOpaque_SkAlphaType);
+ SkEncodedInfo info = SkEncodedInfo::Make(size.width(), size.height(),
+ SkEncodedInfo::kGray_Color, SkEncodedInfo::kOpaque_Alpha, 1);
return new SkWbmpCodec(info, streamDeleter.release());
}

Powered by Google App Engine
This is Rietveld 408576698