Skip to content

Commit

Permalink
[canvaskit] Remove ReadBuffer
Browse files Browse the repository at this point in the history
Takes about 20kb off uncompressed size, 8kb gzipped.

Also turns off AAA and DAA on CPU builds (already off on GPU)

Bug: skia:
Change-Id: I708038394b61cc8eb7944d5ad1a3bb494db6c719
Reviewed-on: https://skia-review.googlesource.com/c/165100
Reviewed-by: Mike Klein <[email protected]>
  • Loading branch information
kjlubick committed Oct 25, 2018
1 parent 331ccfd commit 2cf29ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions experimental/canvaskit/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ fi
mkdir -p $BUILD_DIR

GN_GPU="skia_enable_gpu=true"
GN_GPU_FLAGS="\"-DSK_DISABLE_AAA\", \"-DSK_DISABLE_DAA\", \"-DIS_WEBGL=1\", \"-DSK_DISABLE_LEGACY_SHADERCONTEXT\","
WASM_GPU="-lEGL -lGLESv2 -DSK_SUPPORT_GPU=1 -DSK_DISABLE_AAA -DSK_DISABLE_DAA \
GN_GPU_FLAGS="\"-DIS_WEBGL=1\", \"-DSK_DISABLE_LEGACY_SHADERCONTEXT\","
WASM_GPU="-lEGL -lGLESv2 -DSK_SUPPORT_GPU=1 \
-DSK_DISABLE_LEGACY_SHADERCONTEXT --pre-js $BASE_DIR/gpu.js"
if [[ $@ == *cpu* ]]; then
echo "Using the CPU backend instead of the GPU backend"
Expand Down Expand Up @@ -91,7 +91,7 @@ echo "Compiling bitcode"
cxx=\"${EMCXX}\" \
extra_cflags_cc=[\"-frtti\"] \
extra_cflags=[\"-s\",\"USE_FREETYPE=1\",\"-s\",\"USE_LIBPNG=1\", \"-s\", \"WARN_UNALIGNED=1\",
\"-DSKNX_NO_SIMD\",
\"-DSKNX_NO_SIMD\", \"-DSK_DISABLE_AAA\", \"-DSK_DISABLE_DAA\", \"-DSK_DISABLE_READBUFFER\",
${GN_GPU_FLAGS}
${EXTRA_CFLAGS}
] \
Expand Down Expand Up @@ -154,6 +154,9 @@ ${EMCXX} \
-Isrc/sfnt/ \
-Itools/fonts \
-Itools \
-DSK_DISABLE_READBUFFER \
-DSK_DISABLE_AAA \
-DSK_DISABLE_DAA \
$WASM_GPU \
-std=c++14 \
--bind \
Expand Down

0 comments on commit 2cf29ce

Please sign in to comment.