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

Unified Diff: src/codec/SkWbmpCodec.cpp

Issue 1835083002: Support RGBA/BGRA swizzles using SkEncodedInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@skencodedinfo
Patch Set: Fix bugs 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/SkSwizzler.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkWbmpCodec.cpp
diff --git a/src/codec/SkWbmpCodec.cpp b/src/codec/SkWbmpCodec.cpp
index 3d398ea2ab7aa29e989878ee5c44b540eaecc847..08401f64eb49118ae85daa72524a1cefe41dced0 100644
--- a/src/codec/SkWbmpCodec.cpp
+++ b/src/codec/SkWbmpCodec.cpp
@@ -32,7 +32,8 @@ static inline void setup_color_table(SkColorType colorType,
static inline bool valid_color_type(SkColorType colorType, SkAlphaType alphaType) {
switch (colorType) {
- case kN32_SkColorType:
+ case kRGBA_8888_SkColorType:
+ case kBGRA_8888_SkColorType:
case kIndex_8_SkColorType:
return true;
case kGray_8_SkColorType:
@@ -97,7 +98,7 @@ bool SkWbmpCodec::onRewind() {
SkSwizzler* SkWbmpCodec::initializeSwizzler(const SkImageInfo& info, const SkPMColor* ctable,
const Options& opts) {
- return SkSwizzler::CreateSwizzler(SkSwizzler::kBit, ctable, info, opts);
+ return SkSwizzler::CreateSwizzler(this->getEncodedInfo(), ctable, info, opts);
}
bool SkWbmpCodec::readRow(uint8_t* row) {
« no previous file with comments | « src/codec/SkSwizzler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698