From 7c1ae7af4ff3912bdb518ac21571225155ece365 Mon Sep 17 00:00:00 2001 From: mtklein Date: Mon, 1 Aug 2016 15:50:27 -0700 Subject: 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 --- third_party/libwebp/BUILD.gn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'third_party/libwebp') 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", -- cgit v1.2.3