aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/libwebp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-08-01 15:50:27 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-01 15:50:27 -0700
commit7c1ae7af4ff3912bdb518ac21571225155ece365 (patch)
tree9ca60a4c10114e1612a311c3c3ff687fcc4fc9b0 /third_party/libwebp
parent6fd4c05aaf6f409b8c97ec97eb1041c0dd6a15b4 (diff)
GN: add some missing SkCodec defines
TURBO_HAS_... WEBP_SWAP_16BIT_CSP BUG=skia:5591 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196413003 Review-Url: https://codereview.chromium.org/2196413003
Diffstat (limited to 'third_party/libwebp')
-rw-r--r--third_party/libwebp/BUILD.gn8
1 files changed, 8 insertions, 0 deletions
diff --git a/third_party/libwebp/BUILD.gn b/third_party/libwebp/BUILD.gn
index d27004bdf4..efac7d2e09 100644
--- a/third_party/libwebp/BUILD.gn
+++ b/third_party/libwebp/BUILD.gn
@@ -11,6 +11,14 @@ import("../third_party.gni")
third_party("libwebp") {
public_include_dirs = [ "../externals/libwebp/src" ]
+ defines = [
+ # WebP naturally decodes to RGB_565, and we work with BGR_565.
+ # This makes WebP decode to BGR_565 when we ask for RGB_565.
+ # (It also swaps the color order for 4444, but we don't care today.)
+ # TODO: swizzle ourself in SkWebpCodec instead of requiring this non-standard libwebp.
+ "WEBP_SWAP_16BIT_CSP",
+ ]
+
sources = [
"../externals/libwebp/src/dec/alpha.c",
"../externals/libwebp/src/dec/buffer.c",