Once you have downloaded an android NDK, you can set the ndk GN arg to use it.
E.g. my gn.args looks like:
is_debug = false
ndk = "/opt/android-ndk"
This should be enough to get you going for an arm64 build. You ought to be able to tweak that to other architectures by changing target_cpu to "arm", "x86", "x86-64", etc. That won't quite work until I follow this up a bit, but the skeleton is there.
This is enough to get me compiled, linked, and running to completion on my N5x.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275983004
Review-Url: https://codereview.chromium.org/2275983004
No more:
#include SK_SFNTLY_SUBSETTER
#include ZLIB_INCLUDE
Also, rename SK_SFNTLY_SUBSETTER to SK_PDF_USE_SFNTLY
to follow my pattern of prefixing SkPDF-specific defines
with 'SK_PDF_'.
The ZLIB_INCLUDE define is no longer is used by anyone.
TODO: rename Sfntly to something pronounceable.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273343002
Review-Url: https://codereview.chromium.org/2273343002
- Use options' template pattern for opts too.
- Simplify opt's and options' configs... they should all be the same.
- When building a static-library component in our GN environment (i.e. libskia.a),
make it a complete static lib, fully containing its transitive deps.
- It has not proved useful to override ar.
TBR=jcgregorio@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278673002
Review-Url: https://codereview.chromium.org/2278673002
Our tools use third-party libraries pretty freely, some of which may not
be available in other GN environments (e.g. Fuchsia). Most can also not
function when Skia is built as a shared library.
fiddle stands alone as the exception to both those points: it depends on
only Skia, and works fine with both a shared or static library.
So guard everything but fiddle with this flag skia_enable_tools, disabled
when we're building for Fuchsia or when we're build a shared library.
This CL has a couple of little tweaks to Fiddle to keep it working:
- divorce it from :tool_utils, instead just building SkForceLinking.cpp itself;
- fix up a buggy rebase_path() that was accidentally working when we depended
on :tool_utils;
- drop test_only: it now only requires production-code dependencies.
The SkImageEncoder Create* methods need to be SK_API if we want SkForceLinking
to work across .so's. Without this, SkForceLinking needs to be part of Skia; it
can't be part of the application using Skia.
The rest is mostly just a re-indent under if (skia_enable_tools),
courtesy of gn format.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273823003
No public API changes.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/2273823003
This will be handy for folks who don't have libwebp, like Fuchsia.
I convinced myself that this is done right by:
- building in all three modes (default and explicitly set both ways);
- looking at verbose Ninja logs to see the presence/lack of SK_HAS_WEBP_LIBRARY;
- running dm -m Codec, which passes with libwebp and segfault without it.
If this is viable, I intend to make all third-party dependencies optional
and follow this pattern. :skia should link and degrade gracefully without
any of //third_party. It's okay for tools to have hard third-party
dependencies; we just need them to get past the `gn gen` stage without them.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270693004
Review-Url: https://codereview.chromium.org/2270693004
We might as well match the folks who are using our GN files now.
We've got plenty of strategies in our pocket for when we try to move Chrome
onto our GN files (and who knows, there may be even a new better way by then):
* Same sort of rename in Chrome's third_party
* Aliased targets via //build/secondary in Chrome.
* Indirection via build_overrides
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2265503002
Review-Url: https://codereview.chromium.org/2265503002
About 9x faster than Murmur3 for long inputs.
Most of this is a mechanical change from SkChecksum::Murmur3(...) to SkOpts::hash(...).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2208903002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review-Url: https://codereview.chromium.org/2208903002
If you want to try this out, the DOCS_PREVIEW link is a quickstart.
Are the GrGLCreateNativeInteface_* meant to be part of Skia-the-library
or just used by testing tools? I've got it written here as tool-only,
but we could easily move it to libskia if it's a thing we want to ship.
I'm honestly not sure I understand how this linked before without a definition
of GrGLCreateNativeInterface(). Or are there two, one real and one no-op
default with some sort of weak linking setup? dlopen()?
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201233003
DOCS_PREVIEW= https://skia.org/user/quick/gn?cl=2201233003
Review-Url: https://codereview.chromium.org/2201233003
exec_script runs every time gn does, which is explicitly on every one of our
bot runs. That should be enough to obviate the .git/logs/HEAD hack.
Easiest way to do this was to swap around find.py's argument order to allow
multiple search directories. This is the root of all the .gyp changes.
This moves the blacklist into BUILD.gn, which I think is nice.
It expands it a little as we're now searching recursively, into include/gpu/vk
which we can't include safely without the Vulkan SDK.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205903004
Review-Url: https://codereview.chromium.org/2205903004
These files are now so badly misnamed that it is causing problems.
The original files are kept as shells until Chromium and PDFium can
be updated. After Chromium and PDFium builds are updated, the old
files will be removed and the cmake and bzl builds will be updated.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199973002
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review-Url: https://codereview.chromium.org/2199973002
SkForceLinking wasn't force-linking the WEBP encoder, or any encoder.
(The others must be explicitly used.)
This should help the GN Debug Perf bots progress past
Running Encode_color_wheel.jpg_WEBP nonrendering
../../../bench/EncoderBench.cpp:58: fatal error: "assert(data)"
On my laptop, a debug nanobench run now finishes.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196243002
Review-Url: https://codereview.chromium.org/2196243002
Add nanobench, and while we're at it monobench to show off how cool
source_sets are... the bench files are only built once then linked
into both binaries. With GYP we build them twice. :/ Same deal
for GMs between nanobench and DM... build once, link twice.
nanobench uses SkImageEncoder to encode its .pngs, which requires
we link in the image encoders, which requires we get them all in.
That's the bulk of this.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193513002
Review-Url: https://codereview.chromium.org/2193513002
These flags hide symbols that are not marked with SK_API when linked into a
shared library. There's nominally no effect on static linking, but I'm
pretty sure the Mac linker takes some advantage of this too to run faster.
This makes component-build DM no longer link: it uses many non SK_API APIs.
Fiddle in contrast is just fine with our public APIs, so no need to restrict that.
It'll be fun finding out which of our other tools go which ways.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180383003
Review-Url: https://codereview.chromium.org/2180383003
This builds, links, and runs on Linux. Have not tried Mac.
I've tested is_debug={true,false} and is_component_build.
It's neat that the component build DM works, but it's also an indication I've missed an essential flag or two... it shouldn't work. :)
The GPU backend isn't working yet, but all the software configurations I've tried look good.
This fleshes out all the other parts of SkCodec too... I noticed we weren't able to decode gifs or webp.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188643002
Review-Url: https://codereview.chromium.org/2188643002
- Make fiddle build on Mac (skipping GL).
- Now that we're building in SkCodec, we depend on libpng and libjpeg-turbo unconditionally, not just on Linux.
- Re-arrange third_party a bit so that our targets are Fuchsia/Chrome compatible.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184133002
NOTREECHECKS=true
This doesn't affect Chrome/Blink, so landing through the closed tree.
Review-Url: https://codereview.chromium.org/2184133002
This sketches out what a world without Chrome's GN configs would look like.
Instead of DEPSing in build/, we now host our own gypi_to_gn.py.
The symlink from skia/ to . lets us run gclient hooks when the .gclient file is in the directory above skia/ or inside skia/. That means we don't need gn.py anymore.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167163002
Review-Url: https://codereview.chromium.org/2167163002