Commit Graph

82 Commits

Author SHA1 Message Date
mtklein
b9be979eae format GN files, and invert if->config to config->if
Both if (...) { config ... } else { config ... } and config { if (...) { ...}
else { ... } } work.  We just happen to do the if inside the config more often
than the other way around.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347953002

Review-Url: https://codereview.chromium.org/2347953002
2016-09-16 14:44:18 -07:00
herb
b6318bf44d Compile the skia library for windows using gn.
TBR=mtklein@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347443002

Review-Url: https://codereview.chromium.org/2347443002
2016-09-16 13:29:57 -07:00
mtklein
046cb56c6c GN: build get_images_from_skps.
This also splits :common_flags off of :flags.
get_images_from_skps wants :flags but not :common_flags.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2338173006

Review-Url: https://codereview.chromium.org/2338173006
2016-09-16 10:23:12 -07:00
mtklein
1bd72ba2cb GN: add a flag to implement Android_FrameworkDefs bot.
This bot builds Skia with a bunch of defines to mimic the Android roll.
Apparently it was supposed to be on the CQ... I'll add the GN version
to it when it exists.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2343103002

Review-Url: https://codereview.chromium.org/2343103002
2016-09-16 07:45:52 -07:00
mtklein
f29180e65a GN: enable Vulkan on Android when API >= 24.
Android API >= 24 implies Vulkan support, so we can have a more useful default here than 'false'.  If for some reason you wanted to turn it off, you can still override skia_use_vulkan.

The defined(ndk_api) guards other users of our GN files (Fuchsia) who may not have an ndk_api argument defined in their BUILDCONFIG.gn.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347843003

Review-Url: https://codereview.chromium.org/2347843003
2016-09-16 07:01:17 -07:00
mtklein
1fbdf98d0e GN: support 32-bit x86 builds
Take over Ubuntu -x86- bots.

Note the change to Build-Win-MSVC-x86-Release-GN.json, which is not incidental.
We'll want target_cpu="x86" there too.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340463008

Committed: https://skia.googlesource.com/skia/+/1949386ae00485ae92dd5608a2614b9dee417542

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-Clang-x86-Debug-GN_Android-Trybot,Build-Ubuntu-GCC-x86-Release-Trybot

Review-Url: https://codereview.chromium.org/2340463008
2016-09-15 12:07:48 -07:00
mtklein
56d5669095 Revert of GN: support 32-bit x86 builds (patchset #6 id:100001 of https://codereview.chromium.org/2340463008/ )
Reason for revert:
https://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-Clang-x86-Debug-GN_Android/builds/304

Original issue's description:
> GN: support 32-bit x86 builds
>
> Take over Ubuntu -x86- bots.
>
> Note the change to Build-Win-MSVC-x86-Release-GN.json, which is not incidental.
> We'll want target_cpu="x86" there too.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340463008
>
> Committed: https://skia.googlesource.com/skia/+/1949386ae00485ae92dd5608a2614b9dee417542

TBR=jcgregorio@google.com,borenet@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2338173004
2016-09-15 11:18:56 -07:00
mtklein
1949386ae0 GN: support 32-bit x86 builds
Take over Ubuntu -x86- bots.

Note the change to Build-Win-MSVC-x86-Release-GN.json, which is not incidental.
We'll want target_cpu="x86" there too.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340463008

Review-Url: https://codereview.chromium.org/2340463008
2016-09-15 11:06:25 -07:00
mtklein
88a7ac0b2d GN: add is_official_build
... and use it to control debug symbols and SK_ALLOW_STATIC_GLOBAL_INITIALIZERS.

This will most directly have the effect of disabling GLProgramsTest and a bunch
of similar failing Vk tests on Android.

Hopefully this makes the N7 trybot go green, keeping the N5 trybot green.  Just running the N10 for fun.

(is_official_build is how Chrome terms this sort of ReleaseForReal build.)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340723003

Review-Url: https://codereview.chromium.org/2340723003
2016-09-14 11:16:49 -07:00
fmalita
6519c21a57 Nanobench SVG support
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339743002

Review-Url: https://codereview.chromium.org/2339743002
2016-09-14 08:05:17 -07:00
mtklein
6ef6999017 GN: Android Vulkan support
Android's the easiest place to start supporting Vulkan, so it's up first.

ndk_api becomes user-specifiable so that the Vulkan bots can kick it up
to 24, the first release supporting Vulkan.  The defaults remain the same:
18 for 32-bit and 21 for 64-bit, the first release supporting 64-bit.

To test this, I set ndk_api=24 and skia_use_vulkan=true in GN, then
   $ ninja -C out dm; and droid out/dm --config vk --src gm

Seems to work!  Bot scripts to follow.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2336343002

Review-Url: https://codereview.chromium.org/2336343002
2016-09-14 06:12:09 -07:00
mikejurka
21cc9950c4 re-add SkDebug_stdio for Fuchsia builds
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2331383004

Review-Url: https://codereview.chromium.org/2331383004
2016-09-13 16:15:03 -07:00
fmalita
28d5b72d86 [SVGDom] Initial linear gradient support
Kind of a big change, to connect several new bits into something useful:

  * ID tracking & lookup
  * new asPaint() node virtual to support shader (and in the future filter) based paint servers
  * <defs>, <linearGradient> and <stop> element support
  * 'href', 'offset', 'stop-color', 'stop-opacity' attribute support
  * IRI/FuncIRI and rgb(...) parsing

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2327233003

Review-Url: https://codereview.chromium.org/2327233003
2016-09-12 17:06:47 -07:00
mikejurka
8c24f4fae3 Change shared_sources.gni to use relative path
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333923003

Review-Url: https://codereview.chromium.org/2333923003
2016-09-12 16:51:58 -07:00
mtklein
cdedd0e061 Alternate approach to turn on freetype in Fuchsia.
What do you think of this?  It's basically what you wrote, factored differently.

Flipping on skia_use_freetype will enable the SkFontHost_Freetype*.cpp files
via the :typeface_freetype target.

Then we just pull out the SkFontMgr Fuchsia wants to use into its own little
:fontmgr_fuchsia target.  No major difference here, except the availability
of freetype headers, etc, is a bit more tightly scoped to just those that
need them.

We (obviously?) don't have Fuchsia builders, so I've got to rely on you for sanity testing this.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333913002

Review-Url: https://codereview.chromium.org/2333913002
2016-09-12 15:15:44 -07:00
halcanary
3eee9d941e SkPDF: SkShaper_primitive uses new textblob API
This will enable me to test the new API in unit tests without
depending on HarfBuzz (after https://crrev.com/2322403002 lands).

TBR=
BUG=skia:5434

Review-Url: https://codereview.chromium.org/2332473003
2016-09-10 07:01:53 -07:00
mtklein
b37c034ac8 GN: port a few missing Android bits from GYP.
The SK_GAMMA_ defines change text rendering on Android.
This is how they're set in GYP for Android... everyone else is default (sRGB).

Linking AndroidSkDebugToStdOut.o causes SkDebugf to go to both logcat and
stdout on Android.  Without it, it only goes to logcat.  The file has no effect
on non-Android platforms.

BUG=skia:

Review-Url: https://codereview.chromium.org/2323353002
2016-09-09 11:07:45 -07:00
mtklein
d2e39dbc6a GN: fontmgr_custom
This makes skia_use_fontconfig=false build on Linux.  Instead of using
fontconfig it looks in /usr/share/fonts.

That alone is a nice feature to have, but it's mostly relevant for MSAN,
where we can't link against any uninstrumented system libraries.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2318133003

Review-Url: https://codereview.chromium.org/2318133003
2016-09-07 07:52:55 -07:00
brettw
b944728b93 Move Skia GN sources to a separate .gni file.
This file will be imported by Chrome to access the sources lists.

Once Chrome is updated to use this file, changes to the skia .gypi layout can
be done entirely within the skia repository as long as the resulting lists
produced by the new .gni file have the same name.

Marks skia_for_chromium_defines as obsolete and moves the definition into the new .gni file. We can remove the .gypi file when Chrome is updated.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302803005

Review-Url: https://codereview.chromium.org/2302803005
2016-09-01 14:24:39 -07:00
mtklein
0590fa549d Build LSAN suppressions into the test binaries.
This way you don't need to set LSAN_SUPPRESSIONS in your environment...
sort of foolproof this way.

I _think_ the strdup() business from skia:2916 is actually rooted in
libfontconfig, so one suppression should cover both old ones.

I'll leave the file empty until I clean up mention of it in bot recipes.

BUG=skia:2916
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2295153003

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot

Review-Url: https://codereview.chromium.org/2295153003
2016-09-01 07:06:54 -07:00
mtklein
cd01b03df8 GN: add sources_when_disabled to optional
Also make sources_when_disabled and public_defines optional arguments.
These are the two mechanisms code uses to turn itself off...
probably at most one is ever used per optional.

Update fiddle to not crash when there's no PDF backend.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2292343003

Review-Url: https://codereview.chromium.org/2292343003
2016-08-31 04:58:19 -07:00
mtklein
b6064ef5b8 clean up use of register storage class
This fixes this warning-as-error, so we don't have to stifle it any more:
    error: 'register' storage class specifier is deprecated and incompatible with C++1z [-Werror,-Wdeprecated-register]

Tested by building for mipsel via GN.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289293002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2289293002
2016-08-30 11:49:24 -07:00
mtklein
9e0d9ddc0e GN: add sksl
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2296803002

Review-Url: https://codereview.chromium.org/2296803002
2016-08-30 10:37:19 -07:00
mtklein
6f5df6acb7 Disable sktexttopdf when building for mipsel.
The Clang in the latest NDK crashes when we try to build it for MIPS.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2286303004

Review-Url: https://codereview.chromium.org/2286303004
2016-08-29 16:01:10 -07:00
mtklein
a45be61d6b GN: fontmgr_android
Should be enough to run parser tests on Linux.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2291863002

Review-Url: https://codereview.chromium.org/2291863002
2016-08-29 15:22:10 -07:00
mtklein
3cc2218056 GN: ft and fc as optionals
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2292613002

Review-Url: https://codereview.chromium.org/2292613002
2016-08-29 13:26:15 -07:00
mtklein
349cecefe2 GN: mac host and armv7 target
Just when I thought it wouldn't be useful to override ar...

Tested by building 32- and 64-bit DM on my MBP and running it on my N5x.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2279703003

Review-Url: https://codereview.chromium.org/2279703003
2016-08-26 08:13:04 -07:00
mtklein
7d6fb2c92d GN: Android
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
2016-08-25 14:50:44 -07:00
jcgregorio
5561e3ddbb BUILD.gn: Fix fiddle raster.
BUG=skia:

Review-Url: https://codereview.chromium.org/2269143007
2016-08-25 09:25:12 -07:00
halcanary
650e20d705 SkPDF: Stop #include PREPROCESSOR_DEFINE pattern
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
2016-08-25 09:07:02 -07:00
fmalita
6cf896d7ce Reland: Experimental parsing expression grammar (PEG) template library
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271743002

Committed: https://skia.googlesource.com/skia/+/9d08cbc8c6131ff61a1e71cc5c8cf27841d62b42
Review-Url: https://codereview.chromium.org/2271743002
2016-08-25 08:44:35 -07:00
fmalita
0172e77ad6 Revert of Experimental parsing expression grammar (PEG) template library (patchset #8 id:140001 of https://codereview.chromium.org/2271743002/ )
Reason for revert:
G3 roll & Msan woes.

Original issue's description:
> Experimental parsing expression grammar (PEG) template library
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271743002
>
> Committed: https://skia.googlesource.com/skia/+/9d08cbc8c6131ff61a1e71cc5c8cf27841d62b42

TBR=mtklein@google.com,bungeman@google.com,reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2275943004
2016-08-25 05:50:26 -07:00
anmittal
b8b3f71c55 Add neon and crc32 sources for aarch64
This fixes the build for aarch64 arch

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2272243003

Review-Url: https://codereview.chromium.org/2272243003
2016-08-25 04:55:19 -07:00
fmalita
9d08cbc8c6 Experimental parsing expression grammar (PEG) template library
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271743002

Review-Url: https://codereview.chromium.org/2271743002
2016-08-24 18:23:25 -07:00
mtklein
9b8583dd1f GN: misc
- 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
2016-08-24 17:32:30 -07:00
mtklein
c095df55e8 GN: guard tools (except fiddle) by skia_enable_tools.
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
2016-08-24 12:23:52 -07:00
mtklein
2ff47c2390 GN: Fuchsia probably cannot link without this.
We removed this _none variant globally, thinking we'd put back platform
specific versions as we added support for those platforms.

We don't have anything for Fuchsia.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271273002

Review-Url: https://codereview.chromium.org/2271273002
2016-08-24 10:27:13 -07:00
mtklein
6321381d18 GN: more optional components: jpeg, pdf, png, xml
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267343004

Review-Url: https://codereview.chromium.org/2267343004
2016-08-24 09:55:56 -07:00
mtklein
457b42a639 GN: extract optional() as a template and use for giflib-dependent code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270833003

Review-Url: https://codereview.chromium.org/2270833003
2016-08-23 13:56:37 -07:00
mtklein
09e61f7233 GN: Fix up Ganesh native interface hooks.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269213002

Review-Url: https://codereview.chromium.org/2269213002
2016-08-23 13:35:28 -07:00
mtklein
da19f6f3b5 Assume all TURBO_HAS_* are true.
Should be everyone's on libjpeg-turbo >= 1.5.0.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274643002

Review-Url: https://codereview.chromium.org/2274643002
2016-08-23 11:49:29 -07:00
mtklein
eb3c425f1b GN: make libwebp an optional dependency
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
2016-08-23 07:38:09 -07:00
mtklein
0a8efd7355 GN: _turbo -> -turbo to match Fuchsia
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
2016-08-22 06:32:39 -07:00
mtklein
3896effcad GN: make libjpeg_turbo target Chrome-compatible
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257903002

Review-Url: https://codereview.chromium.org/2257903002
2016-08-18 12:04:13 -07:00
anmittal
a7eaf2e7e8 Fix BUILD.gn for arch other then x86 and x64
opts_gypi should only be defined for x86 and x64 else we get unused
variable error

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248323002

Review-Url: https://codereview.chromium.org/2248323002
2016-08-17 13:57:26 -07:00
fmalita
d24ee1419f [SVGDom] Add <line> support
R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2244223005

Review-Url: https://codereview.chromium.org/2244223005
2016-08-17 08:38:15 -07:00
mtklein
422310ddbe GN: make current_cpu work
Then we can use it to remind ourselves that SSE and AVX are x86-only.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2247413003

Review-Url: https://codereview.chromium.org/2247413003
2016-08-16 18:28:43 -07:00
fmalita
dc4c2a9fb7 [SVGDom] Add <circle>, <ellipse> support
R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249033003

Review-Url: https://codereview.chromium.org/2249033003
2016-08-16 15:38:51 -07:00
fmalita
5b31f321fc [SVGDom] <polygon> & <polyline> support
R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2235273003

Review-Url: https://codereview.chromium.org/2235273003
2016-08-12 12:15:33 -07:00
mtklein
4e97607d9a Use sse4.2 CRC32 instructions to hash when available.
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
2016-08-08 09:06:28 -07:00