Commit b517eb89 authored by Nigel Tao's avatar Nigel Tao Committed by Commit Bot

Add third_party/wuffs

Skia (https://skia.googlesource.com/skia) is a 2-D graphics library,
already in use by Chromium as third_party/skia. Wuffs
(https://github.com/google/wuffs) is a memory-safe programming language
whose standard library includes a GIF image decoder. Wuffs' standard
library is also available as transpiled C code. From Skia's (and
Chromium's) point of view, Wuffs' standard library is just another C
library. It's just not hand-written C.

Upstream Skia is moving to use Wuffs for GIF image decoding
(https://bugs.chromium.org/p/skia/issues/detail?id=8235). For Chromium,
this commit (adding third_party/wuffs, but no change in the generated
binaries yet) is the first in a series of commits (see
crbug.com/1014044) to have Skia-in-Chromium also use Wuffs.

Wuffs is released under the Apache License 2.0:
https://github.com/google/wuffs/blob/master/LICENSE

Bug: 1014044
Change-Id: I6b41794af09b07aacc48d519651bc397e761ad71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1859536Reviewed-by: default avatarChris Palmer <palmer@chromium.org>
Reviewed-by: default avatarMatthew Denton <mpdenton@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Nigel Tao <nigeltao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708485}
parent fa7e2f14
......@@ -323,6 +323,10 @@ vars = {
# the commit queue can handle CLs rolling libexpat
# and whatever else without interference from each other.
'libexpat_revision': '25d3c190c69ea7f98e2826f901fd9e28b6f7f3fd',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling wuffs
# and whatever else without interference from each other.
'wuffs_revision': '4080840928c0b05a80cda0d14ac2e2615f679f1a',
# TODO(crbug.com/941824): The values below need to be kept in sync
# between //DEPS and //buildtools/DEPS, so if you're updating one,
......@@ -1507,6 +1511,11 @@ deps = {
'src/third_party/webrtc':
Var('webrtc_git') + '/src.git' + '@' + '8e13e6ed3dfbd2009f4c2e781dc19621d9dd8ca3',
# Wuffs' canonical repository is at github.com/google/wuffs, but we use
# Skia's mirror of Wuffs, the same as in upstream Skia's DEPS file.
'src/third_party/wuffs/src':
Var('skia_git') + '/external/github.com/google/wuffs.git' + '@' + Var('wuffs_revision'),
'src/third_party/xdg-utils': {
'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
'condition': 'checkout_linux',
......
......@@ -243,6 +243,7 @@
/win_toolchain/.timestamps
/win_toolchain/files
/wix
/wuffs/src
/xdg-utils
/xstream/lib/
/xulrunner-sdk
......
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
static_library("wuffs") {
defines = [
# Copy/pasting from "src/release/c/wuffs-*.c":
#
# ----
#
# Wuffs ships as a "single file C library" or "header file library" as per
# https://github.com/nothings/stb/blob/master/docs/stb_howto.txt
#
# To use that single file as a "foo.c"-like implementation, instead of a
# "foo.h"-like header, #define WUFFS_IMPLEMENTATION before #include'ing or
# compiling it.
#
# ----
"WUFFS_IMPLEMENTATION",
# Continuing to copy/paste:
#
# ----
#
# Defining the WUFFS_CONFIG__MODULE* macros are optional, but it lets users
# of Wuffs' .c file whitelist which parts of Wuffs to build. That file
# contains the entire Wuffs standard library, implementing a variety of
# codecs and file formats. Without this macro definition, an optimizing
# compiler or linker may very well discard Wuffs code for unused codecs,
# but listing the Wuffs modules we use makes that process explicit.
# Preprocessing means that such code simply isn't compiled.
#
# ----
#
# For Chromium, we're only interested in particular image codes (e.g. GIF)
# and their dependencies (e.g. BASE, LZW).
"WUFFS_CONFIG__MODULES",
"WUFFS_CONFIG__MODULE__BASE",
"WUFFS_CONFIG__MODULE__GIF",
"WUFFS_CONFIG__MODULE__LZW",
]
sources = [
"src/release/c/wuffs-v0.2.c",
]
}
This diff is collapsed.
nigeltao@chromium.org
scroggo@chromium.org
# COMPONENT: Internals>Skia
Name: Wuffs (Wrangling Untrusted File Formats Safely)
Short name: Wuffs
URL: https://github.com/google/wuffs
Version: 0.2.0-rc.1
Revision: 4080840928c0b05a80cda0d14ac2e2615f679f1a
Security critical: yes
License: Apache 2.0
Description:
Codecs (compression, images, etc.) written in a custom memory-safe programming
language, transpiled to C.
Local Modifications:
None.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment