aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkWebpCodec.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-06-27 19:53:21 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-28 17:41:56 +0000
commitc2d207603edbbd3809d5144fe4a048a2ad774910 (patch)
tree085c3b6856acffa6f2a1f88616517c3186046a73 /src/codec/SkWebpCodec.cpp
parente5cb7c9a5eb3d4d848a0adb50502382be14d193d (diff)
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>
Diffstat (limited to 'src/codec/SkWebpCodec.cpp')
-rw-r--r--src/codec/SkWebpCodec.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp
index 68301b93f8..d94011a867 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -320,10 +320,13 @@ static void pick_memory_stages(SkColorType ct, SkRasterPipeline::StockStage* loa
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 @@ static void blend_line(SkColorType dstCT, void* dst,
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);