Skip to content

Commit

Permalink
Use brotli to compress ink resources on ChromeOS
Browse files Browse the repository at this point in the history
This CL reduces the size of ChromeOS resources.pak by 996kiB.

One resource wasn't compressed at all, which accounts for 165kiB
of the savings.

Bug: 1015978
Change-Id: Iab7084e57446549187fc22a428e435e39856d267
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918786
Reviewed-by: dstockwell <dstockwell@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715592}
  • Loading branch information
tapted authored and Commit Bot committed Nov 15, 2019
1 parent df48034 commit 041f305
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions third_party/ink/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ if (is_chromeos) {
grit("ink_resources") {
source = "ink_resources.grd"

use_brotli = true

outputs = [
"grit/ink_resources.h",
"grit/ink_resources_map.cc",
Expand Down
6 changes: 3 additions & 3 deletions third_party/ink/ink_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<if expr="chromeos">
<include name="IDR_INK_LIB_BINARY_JS" file="build/ink_lib_binary.js" type="BINDATA" />
<include name="IDR_INK_PTHREAD_MAIN_JS" file="build/wasm-threads/pthread-main.js" type="BINDATA" />
<include name="IDR_INK_GLCORE_BASE_WASM" file="build/wasm-threads/glcore_base.wasm" compress="gzip" type="BINDATA" />
<include name="IDR_INK_GLCORE_BASE_JS_MEM" file="build/wasm-threads/glcore_base.js.mem" compress="gzip" type="BINDATA" />
<include name="IDR_INK_GLCORE_WASM_BOOTSTRAP_COMPILED_JS" file="build/wasm-threads/glcore_wasm_bootstrap_compiled.js" type="BINDATA" />
<include name="IDR_INK_GLCORE_BASE_WASM" file="build/wasm-threads/glcore_base.wasm" compress="brotli" type="BINDATA" />
<include name="IDR_INK_GLCORE_BASE_JS_MEM" file="build/wasm-threads/glcore_base.js.mem" compress="brotli" type="BINDATA" />
<include name="IDR_INK_GLCORE_WASM_BOOTSTRAP_COMPILED_JS" file="build/wasm-threads/glcore_wasm_bootstrap_compiled.js" compress="brotli" type="BINDATA" />
</if>
</includes>
</release>
Expand Down

0 comments on commit 041f305

Please sign in to comment.