2018-05-28 13:19:44 +00:00
|
|
|
# Dockerfile for building Skia in release mode, using 3rd party libs from DEPS, with SwiftShader.
|
2019-10-14 18:47:11 +00:00
|
|
|
FROM gcr.io/skia-public/skia-build-tools:latest
|
2018-05-28 13:19:44 +00:00
|
|
|
|
|
|
|
RUN cd /tmp \
|
2019-10-14 18:47:11 +00:00
|
|
|
&& git clone https://swiftshader.googlesource.com/SwiftShader swiftshader
|
|
|
|
|
|
|
|
# Checkout Skia.
|
|
|
|
RUN mkdir -p /tmp/skia \
|
2018-05-28 13:19:44 +00:00
|
|
|
&& cd /tmp/skia \
|
2019-10-14 18:47:11 +00:00
|
|
|
&& fetch skia \
|
|
|
|
&& cd skia \
|
|
|
|
&& gclient sync \
|
|
|
|
&& ./bin/fetch-gn
|
2018-05-28 13:19:44 +00:00
|
|
|
|
2019-10-14 18:47:11 +00:00
|
|
|
# Write args.gn.
|
2018-05-28 13:19:44 +00:00
|
|
|
RUN mkdir -p /tmp/skia/skia/out/Static
|
|
|
|
RUN echo ' \n\
|
|
|
|
cc = "clang" \n\
|
|
|
|
cxx = "clang++" \n\
|
|
|
|
skia_use_egl = true \n\
|
|
|
|
is_debug = false \n\
|
|
|
|
skia_use_system_freetype2 = false \n\
|
|
|
|
extra_cflags = [ \n\
|
|
|
|
"-I/tmp/swiftshader/include", \n\
|
|
|
|
"-DGR_EGL_TRY_GLES3_THEN_GLES2", \n\
|
|
|
|
"-g0", \n\
|
|
|
|
] \n\
|
|
|
|
extra_ldflags = [ \n\
|
|
|
|
"-L/usr/local/lib", \n\
|
|
|
|
"-Wl,-rpath", \n\
|
|
|
|
"-Wl,/usr/local/lib" \n\
|
2019-06-24 16:33:07 +00:00
|
|
|
] ' > /tmp/skia/skia/out/Static/args.gn
|
2018-05-28 13:19:44 +00:00
|
|
|
|
2019-10-14 18:47:11 +00:00
|
|
|
# Build Skia.
|
2018-05-28 13:19:44 +00:00
|
|
|
RUN cd /tmp/skia/skia \
|
2018-05-29 17:56:27 +00:00
|
|
|
&& ./bin/gn gen out/Static \
|
2018-06-20 13:53:05 +00:00
|
|
|
&& git rev-parse HEAD > VERSION \
|
2019-10-08 23:19:08 +00:00
|
|
|
&& /tmp/depot_tools/ninja -C out/Static \
|
|
|
|
&& chown -R skia:skia .
|
2018-05-29 17:56:27 +00:00
|
|
|
|
|
|
|
# Uncomment the lines below and update the ref to patch in a CL.
|
|
|
|
#
|
|
|
|
#RUN cd /tmp/skia/skia \
|
|
|
|
# && git fetch https://skia.googlesource.com/skia refs/changes/25/130325/15 \
|
|
|
|
# && git checkout FETCH_HEAD \
|
|
|
|
# && /tmp/depot_tools/ninja -C out/Static
|