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

Unified Diff: src/codec/SkSampler.cpp

Issue 1907593004: Support the non-native (RGBA/BGRA) swizzle (Closed) Base URL: https://skia.googlesource.com/skia.git@tryagain
Patch Set: Multiple bug fixes 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/SkSwizzler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkSampler.cpp
diff --git a/src/codec/SkSampler.cpp b/src/codec/SkSampler.cpp
index c69d003c0f584fd5f5e6edf9a678d6d517b5ddc0..ccfe400ec931fbbace9a7ec6bcbe750bbf82a43f 100644
--- a/src/codec/SkSampler.cpp
+++ b/src/codec/SkSampler.cpp
@@ -21,7 +21,8 @@ void SkSampler::Fill(const SkImageInfo& info, void* dst, size_t rowBytes,
// Use the proper memset routine to fill the remaining bytes
switch (info.colorType()) {
- case kN32_SkColorType: {
+ case kRGBA_8888_SkColorType:
+ case kBGRA_8888_SkColorType: {
// If memory is zero initialized, we may not need to fill
uint32_t color = colorOrIndex;
if (SkCodec::kYes_ZeroInitialized == zeroInit && 0 == color) {
« no previous file with comments | « src/codec/SkPngCodec.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698