aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
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 /tools
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 'tools')
-rw-r--r--tools/picture_utils.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/picture_utils.cpp b/tools/picture_utils.cpp
index 183e78ec81..93d598ddbd 100644
--- a/tools/picture_utils.cpp
+++ b/tools/picture_utils.cpp
@@ -89,17 +89,14 @@ namespace sk_tools {
SkRasterPipeline_<256> p;
switch (bitmap.colorType()) {
case kRGBA_F16_SkColorType: p.append(SkRasterPipeline::load_f16, &src); break;
- case kRGBA_8888_SkColorType:
- case kBGRA_8888_SkColorType: p.append(SkRasterPipeline::load_8888, &src); break;
+ case kBGRA_8888_SkColorType: p.append(SkRasterPipeline::load_bgra, &src); break;
+ case kRGBA_8888_SkColorType: p.append(SkRasterPipeline::load_8888, &src); break;
case kRGB_565_SkColorType: p.append(SkRasterPipeline::load_565, &src); break;
default: SkASSERT(false); // DM doesn't support any other formats, does it?
}
if (bitmap.info().gammaCloseToSRGB()) {
p.append_from_srgb(kUnpremul_SkAlphaType);
}
- if (bitmap.colorType() == kBGRA_8888_SkColorType) {
- p.append(SkRasterPipeline::swap_rb);
- }
p.append(SkRasterPipeline::unpremul);
p.append(SkRasterPipeline::clamp_0);
p.append(SkRasterPipeline::clamp_1);