aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/libwebp/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebp/BUILD.gn')
-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",