aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkBmpCodec.h
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2016-11-08 16:13:43 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-08 22:27:02 +0000
commit562e681e5c600e919c3b57201b85776c4789f5aa (patch)
treecd513930870236e8ebd3b6a16aadf0eebd79a4f8 /src/codec/SkBmpCodec.h
parent1d3ab12b82e1fa16a0d6b6b9cc1c0290b45cbca9 (diff)
Refactor RGBA/BGRA xform logic in SkCodecs
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4554 Change-Id: Ic9105a2806b915fc56b6810a80dd444561d0d959 Reviewed-on: https://skia-review.googlesource.com/4554 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/codec/SkBmpCodec.h')
-rw-r--r--src/codec/SkBmpCodec.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/codec/SkBmpCodec.h b/src/codec/SkBmpCodec.h
index a51bbcecc3..0e38c84059 100644
--- a/src/codec/SkBmpCodec.h
+++ b/src/codec/SkBmpCodec.h
@@ -110,6 +110,12 @@ protected:
uint32_t* xformBuffer() const { return fXformBuffer.get(); }
void resetXformBuffer(int count) { fXformBuffer.reset(new uint32_t[count]); }
+ /*
+ * BMPs are typically encoded as BGRA/BGR so this is a more efficient choice
+ * than RGBA.
+ */
+ static const SkColorType kXformSrcColorType = kBGRA_8888_SkColorType;
+
private:
/*