clean up low-hanging swap_rb
There are two remaining swap_rb uses that both look non-trivial to
replace:
- sampling out of index8 when the color table is bgra
- table transforms on bgra inputs in SkColorSpaceXform
I don't think it's a big deal to just leave swap_rb around,
just a little sad.
Change-Id: I3d30200cf867cbf37d6f86572b1574d3e22e3490
Reviewed-on: https://skia-review.googlesource.com/21040
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index 68301b9..d94011a 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -320,10 +320,13 @@
if (store) *store = SkRasterPipeline::store_565;
break;
case kRGBA_8888_SkColorType:
- case kBGRA_8888_SkColorType:
if (load) *load = SkRasterPipeline::load_8888;
if (store) *store = SkRasterPipeline::store_8888;
break;
+ case kBGRA_8888_SkColorType:
+ if (load) *load = SkRasterPipeline::load_bgra;
+ if (store) *store = SkRasterPipeline::store_bgra;
+ break;
case kRGBA_F16_SkColorType:
if (load) *load = SkRasterPipeline::load_f16;
if (store) *store = SkRasterPipeline::store_f16;
@@ -358,10 +361,6 @@
SkRasterPipeline::StockStage load_src;
pick_memory_stages(srcCT, &load_src, nullptr);
p.append(load_src, src);
- if (dstCT != srcCT) {
- SkASSERT(kBGRA_8888_SkColorType == srcCT);
- p.append(SkRasterPipeline::swap_rb);
- }
p.extend(convert_to_linear_premul);
p.append(SkRasterPipeline::srcover);