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
This commit is contained in:
mtklein 2016-08-01 15:50:27 -07:00 committed by Commit bot
parent 6fd4c05aaf
commit 7c1ae7af4f
2 changed files with 12 additions and 0 deletions

View File

@ -65,6 +65,10 @@ config("skia_private") {
"SK_HAS_JPEG_LIBRARY",
"SK_HAS_PNG_LIBRARY",
"SK_HAS_WEBP_LIBRARY",
"TURBO_HAS_565",
"TURBO_HAS_CROP",
"TURBO_HAS_SKIP",
]
}

View File

@ -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",