Commit Graph

270 Commits

Author SHA1 Message Date
bungeman
0f3d0c37db Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
Reviewed-on: https://skia-review.googlesource.com/8684
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-23 18:41:57 +00:00
Brian Salomon
03e058414c Fix Chrome iOS no GPU build and block includes from src/gpu on our NoGpu bot.
Change-Id: I934f0d6096a6eb0305e24f06dfb6c49299a195a9
Reviewed-on: https://skia-review.googlesource.com/8919
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-23 18:01:10 +00:00
Mike Klein
a979a1d39d Move around GL dependencies.
:gpu gets GL and GLU
  :gpu_tool_utils gets X11
  :views gets GL and X11

{shared,static}x{gpu,no-gpu} all seem to link.
May not be perfect, but it's a start.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-GCC-x86_64-Debug-NoGPU,Build-Ubuntu-GCC-x86_64-Release-Shared

Change-Id: Ia6f595a9d601f623a3c686aa00528a80401bcb24
Reviewed-on: https://skia-review.googlesource.com/8911
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-23 16:15:07 +00:00
Mike Klein
d44dd4c356 Fold MSAN awareness into SkJumper.cpp.
This is preparation for removing skia_enable_jumper, making it true.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Change-Id: I21763ea5ebafaaddda7056176796307f1a81d722
Reviewed-on: https://skia-review.googlesource.com/8830
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-22 16:16:58 +00:00
Mike Klein
ed1b9022b3 SkJumper: Windows
- Compile stages with -DWIN to pick up MS-specific start_pipeline().
    - Add SkJumper_generated_win.S with MS-specific assembly.
    - Add a minimal asm tool to our GN Windows toolchain.

The SkRasterPipeline_f16 benchmark run ~4x faster on my desktop.

Change-Id: Ia45afb4ecb6a055e2c0e43f0f54f59e081c23b7f
Reviewed-on: https://skia-review.googlesource.com/8778
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-21 19:48:19 +00:00
Kevin Lubick
fd98b5ee76 Remove unneeded is_fuzzing flag
BUG=skia:6260

Change-Id: Id27ac7f64276f87f86719bf4fc3f8834466320ab
Reviewed-on: https://skia-review.googlesource.com/8800
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-21 18:48:51 +00:00
Ravi Mistry
9048851e57 Move declaration of is_fuzzer to where it is used
BUG=skia:6260

Change-Id: Iaca4fb1afb4d182f4d2ae64d939729363a226ce6
Reviewed-on: https://skia-review.googlesource.com/8772
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-02-21 16:33:44 +00:00
Kevin Lubick
edee1ae9e3 Write SkRegion fuzzer
BUG=688987

Change-Id: I2ad1c53ea01185a77b662d2d86b0c6d36fcb63c7
Reviewed-on: https://skia-review.googlesource.com/8499
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-02-20 23:18:58 +00:00
Mike Klein
16fcb230cc SkJumper: aarch64 and armv7
Change-Id: Ie356b062372af3516a437d27bafa20d98e28edd6
Reviewed-on: https://skia-review.googlesource.com/8678
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-02-18 13:31:44 +00:00
Mike Klein
cc3c2ed994 Disable SkJumper on MSAN builds.
Change-Id: I89c944f5ed1e1a9aee5e73c384a53d86fd13d07e
Reviewed-on: https://skia-review.googlesource.com/8683
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-17 22:22:53 +00:00
Mike Klein
c12551c1f3 SkJumper: Linux
Just need to take care to match C symbols with asm symbols.  Linux
doesn't add the leading underscore automatically like Mac and Windows.

Change-Id: I488cdfec942b442554ffefdfd006a1305ad77d9d
Reviewed-on: https://skia-review.googlesource.com/8667
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-17 21:14:00 +00:00
Ben Wagner
7d07d46638 Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 87e7f820f7.

Reason for revert: Failed a test on Mac

Original change's description:
> Add SkTypeface::getVariationDesignPosition.
> 
> Allow users to query a typeface's position in variation design space.
> 
> Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198
> Reviewed-on: https://skia-review.googlesource.com/7130
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=bungeman@google.com,reed@google.com,reviews@skia.org,drott@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ia65792083642dbe9333a62eb75d162931b57cffd
Reviewed-on: https://skia-review.googlesource.com/8670
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-17 18:39:09 +00:00
Ben Wagner
87e7f820f7 Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: I5d80c8ff658708a5d1aa386ec5b7396dcb621198
Reviewed-on: https://skia-review.googlesource.com/7130
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-17 18:05:47 +00:00
Mike Klein
d1fe9522e3 SkJumper: start on asm
Will follow up with Linux, then Android aarch64 and armv7, then iOS, then Windows.

I took some opportunities to refactor.

CQ_INCLUDE_trybots=skia.primary:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug,Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug

Change-Id: Ifcf1edabdfe5df0a91bd089f09523aba95cdf5ef
Reviewed-on: https://skia-review.googlesource.com/8611
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-02-17 17:29:25 +00:00
Herb Derby
3bf12c60e2 Remove third_party/ktx from Skia.
Change-Id: I3a1f68b0528f8789af5ccc0704b0a68fe14f52d3
Reviewed-on: https://skia-review.googlesource.com/8319
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-02-16 20:03:46 +00:00
Mike Klein
0c8f7a335e Revert "Turn on SkJumper except on Windows."
This reverts commit 957cf45949.

Reason for revert: crashes

Original change's description:
> Turn on SkJumper except on Windows.
> 
> ...only for our local testing.  No Skia users should be affected yet.
> 
> Change-Id: If1c46efe418458f747aafd6be8e2ae799c74b1c4
> Reviewed-on: https://skia-review.googlesource.com/8470
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Id27f51c3b9356471b3178bbd63b021bd67a1d6fb
Reviewed-on: https://skia-review.googlesource.com/8477
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-16 14:03:03 +00:00
Mike Klein
957cf45949 Turn on SkJumper except on Windows.
...only for our local testing.  No Skia users should be affected yet.

Change-Id: If1c46efe418458f747aafd6be8e2ae799c74b1c4
Reviewed-on: https://skia-review.googlesource.com/8470
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-16 13:38:37 +00:00
Mike Klein
e1caee1ad8 SkJumper
Change-Id: If9f73e712e429564fef58ccb838c212ec8d2e68c
Reviewed-on: https://skia-review.googlesource.com/8525
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-02-16 00:27:57 +00:00
Mike Klein
f6a1a2179a Clean up SkSplicer.
SkJumper's looking promising enough that I want this further out of my face.

Change-Id: I6dbe71aeabe32f7f4258ba157460e6985733b0ce
Reviewed-on: https://skia-review.googlesource.com/8528
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-02-15 22:47:58 +00:00
Mike Klein
ef163d2acf Disable SkSplicer.
Easier to work on SkJumper with SkSplicer out of my hair.

Change-Id: I6217082c5b4f83c79ac231f23e42a92d2efd6446
Reviewed-on: https://skia-review.googlesource.com/8509
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-15 18:29:42 +00:00
Herb Derby
5a8fe978c3 Remove include/xml from public API.
Move SkDOM and ilk from include/xml to src/xml.

I have looked for uses of SkDOM in the depot using cs/ and have found none,
but this is not perfect. So, if this breaks external builds, revert it.

TBR=reed@google.com

Change-Id: I162a1977f0649b049c0f93f016701784d025996d
Reviewed-on: https://skia-review.googlesource.com/8447
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-02-14 20:17:05 +00:00
Brian Osman
79086b94ed Integrate the ImGui library with viewer
Code and docs are at: https://github.com/ocornut/imgui

ImGui is an open source immediate mode GUI library that's
lightweight and fairly simply to integrate. Widget functions
return their state, and the library emits vertex and index
data to render everything. It's got a huge set of built-in
widgets and really robust layout control.

For the initial integration, I had to fix up event handling
in the viewer's app framework (to get mouse wheel and more
keys, etc...).

The new viewer 'Debug' window is toggled with the space bar.
For this change, I've added one feature to that window: the
slide picker. It's got a list of all slides, with filtering
support, and the ability to click to switch slides.

I also included the ImGui 'Demo' window (toggled with 'g').
This is nicely laid out, and includes examples of pretty
much everything the library can do. It also serves as good
documentation - find something that looks like what you want,
and then go look at the corresponding code (all of it is in
imgui_demo.cpp).

I have other CLs with other features (like directly editing
the primaries of the working color space), but I wanted to
land this chunk first, then start adding more features.

Other than adding new debugging features, there are few
more outstanding work items:

1) Raster doesn't render the GUI correctly, due to non-
invertible pos -> UV matrices. Florin is working on that.
2) Touch inputs aren't being routed yet, so the GUI isn't
usable on Android yet. Might also be tough to work with,
given the size.
3) ImGui has clipboard integration (that's why it wants
the C, X, and V keys), but we need to wire it up to the
OS' clipboard functions.
4) Draw commands can carry a void* payload to support
drawing images (using whatever mechanism the engine has).
I'd like to set that up (probably using SkImage*), which
makes it really easy to add visualization of off-screen
images in GMs, etc...

BUG=skia:

Change-Id: Iac2a63e37228d33141cb55b7e4d60bf11b7e9ae1
Reviewed-on: https://skia-review.googlesource.com/7702
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-10 19:17:03 +00:00
Mike Klein
bd41bcc4d7 SkSVGCanvas and co. depend on expat.
SkSVGCanvas depends on SkSVGDevice which depends on SkXMLWriter.cpp
which depends on expat.  So don't build any of this if we don't have
expat.

Change-Id: I1ffca2d58d3b607febf11ce75abdd6efe08f49c8
Reviewed-on: https://skia-review.googlesource.com/8289
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-09 22:16:05 +00:00
Mike Klein
29b3e58bef Don't build sksl if we're not building Ganesh.
No point linking sksl into libskia if we won't use it, right?

Change-Id: Iafd3d14ccd7ae0bc360cc928ba809e935fa5d55b
Reviewed-on: https://skia-review.googlesource.com/8258
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-09 20:14:42 +00:00
Mike Klein
a04bb45b23 Make src/effects explicitly optional.
This adds a GN argument to disable src/effects, which can cut about 1M
off libskia.  It's not the first place you'd go to trim code size, but
after turning off easy big things like Ganesh, it starts looking big.

I tested that fiddle builds and links.  It uses Skia but not effects.
Most of our test apps use effects and can't build in this new mode.

Change-Id: I9b5d6e9289a87bc08eedf6d202d0eabe754da41a
Reviewed-on: https://skia-review.googlesource.com/8263
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-09 19:30:25 +00:00
Brian Osman
462334ebc1 Fix viewer on Android
We need libandroid in all scenarios, not just vulkan.
Also, the logic for making an off-screen surface was
wrong - causing us to try and make one in legacy mode.

BUG=skia:

Change-Id: I5ef2e3e2d46de96e9824f6a12a13f6310ea04f81
Reviewed-on: https://skia-review.googlesource.com/8252
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-02-09 17:07:24 +00:00
Ben Wagner
8ab590f17f Split custom font managers.
Some users would like to use the empty font manager, but the directory
gont manager brings in extra dependencies to work which would otherwise
be unneeded. Allow these users to build just the bits of code they
actually need.

Change-Id: Ib029ef2682883509bad5a2aa39f1ef55631f4d8a
Reviewed-on: https://skia-review.googlesource.com/8200
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-09 14:50:05 +00:00
Brian Osman
f750fbcb69 Simplify viewer's handling of backbuffer surface and color space
WindowContext still supports color spaces, but not other color
types. Any off-screen rendering is the app's responsibility.

This change also adds (working) F16 support to viewer. Note that
the previous 10-bit and FP16 support in WindowContext was broken.
There was no code to push the off-screen canvas to the window.
If you ever made it to the unreachable off-screen code path in
createSurface, it would have simply stopped drawing.

The decision to limit the window's gamut to sRGB is mostly driven
by my desire to add real-time editing of gamut. This design lets
us do that, without tearing down and rebuilding the window for
every change. An application could still supply a different gamut
via setDisplayParams and render directly to the back buffer with
proper color correction.

BUG=skia:

Change-Id: I94df35c7a42faee396009acc83683e40bb3c284d
Reviewed-on: https://skia-review.googlesource.com/8153
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-08 17:34:05 +00:00
Mike Klein
adacaef799 iOS: cd into Documents folder at startup
CQ_INCLUDE_TRYBOTS=skia.primary:Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release

Change-Id: I7beadad742bc9444491c7a315a827297a636d70d
Reviewed-on: https://skia-review.googlesource.com/8049
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-02-06 15:06:45 +00:00
Ravi Mistry
10d36c5455 Add GN target for skpinfo
BUG=skia:6178

Change-Id: If6f96063fcb4e541da560ff00b925fd8098ce6b9
Reviewed-on: https://skia-review.googlesource.com/7791
Commit-Queue: Ravi Mistry <rmistry@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-31 15:18:42 +00:00
Mike Klein
1c471874c5 Fix Android roll
- only depend on cpu-features when we know we have an NDK
    - disable SkSplicer

Change-Id: I89e4cc70d6ddf0ebb7005d1cb453768d946cd205
Reviewed-on: https://skia-review.googlesource.com/7060
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-13 21:17:05 +00:00
Mike Klein
4ef8cb3527 some armv7 hacking
We can splice these stages if we drop them down to 2 at a time.
Turns out this is significantly (2-3x) faster than the status quo.

    SkRasterPipeline_…
    …f16_compile 1x  …srgb_compile 2.06x  …f16_run 3.08x  …srgb_run 4.61x

Added a couple ways to detect (likely) the required VFPv4 support:
   - use hwcap when available (NDK ≥21, Android framework)
   - use cpu-features when not (NDK <21)

The code in SkSplicer_generated.h is ARM, not Thumb2.  SkSplicer seems
to be blx'ing into it, so that's great, and we bx lr out.  There's no
point in attempting to use Thumb2 in vector heavy code... it'll all be
4 byte anyway.

Follow ups:
   - vpush {d8-d9} before the loop, vpop {d8-d9} afterwards,
     skip these instructions when splicing;
   - (probably) drop jumping stages down to 2-at-a-time also.

Change-Id: If151394ec10e8cbd6a05e2d81808488d743bfe15
Reviewed-on: https://skia-review.googlesource.com/6940
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-13 17:25:15 +00:00
Derek Sollenberger
4a0a943d57 Remove defunct include/images directory from GN.
BUG=skia:6065

Change-Id: I332581cca684c4918dc87434509744b8bf4f5ed8
Reviewed-on: https://skia-review.googlesource.com/6944
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-12 15:02:14 +00:00
Mike Klein
621ea115e0 only copy NDK binaries when using NDK in our standalone builds
i.e. not when generating Android.bp (and in the future, not in Clank builds)

BUG=skia:6065

Change-Id: I52bdd5f01deb5e5b4d9e72bec197a82dc887be88
Reviewed-on: https://skia-review.googlesource.com/6941
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-12 13:36:36 +00:00
Mike Klein
09326e7a92 SkSplicer: start on Windows support
should just be missing copy_to_executable_mem() / cleanup_executable_mem()

Change-Id: I47d34d4b57a40c07120cca7dc03f6ae22ecbe910
Reviewed-on: https://skia-review.googlesource.com/6854
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-01-11 19:20:37 +00:00
Mike Klein
c7adce1193 disable splicer on MSAN bot
Not sure what to do about this long term.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Change-Id: If9e86c285914ce2d8255ac25197845728d7c5d49
Reviewed-on: https://skia-review.googlesource.com/6842
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-10 19:38:21 +00:00
Mike Klein
13ccda4847 SkSplicer: fix aarch64 jump offset, turn on testing on aarch64 Android bots
I also updated the dump feature to work with aarch64, and included comments on how to disassemble an aarch64 dump.

Looking at an aarch64 dump made it immediately obvious that the jump offset was off by 1.

Change-Id: I17fa6ee44779e8be69ab4582e338c88212aba36c
Reviewed-on: https://skia-review.googlesource.com/6841
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-10 19:29:43 +00:00
Mike Klein
7662066112 Test SkSplicer on x86-64 bots, except Windows.
Will follow up later with (is_android && target_cpu == "arm64").  Just being cautious.

Change-Id: I32bf48dec55633d6386c66fd0f11fc5616596477
Reviewed-on: https://skia-review.googlesource.com/6834
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-10 18:33:21 +00:00
Mike Klein
c0a7a08359 remove xbyak experiment
SkSplicer is better.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I014ec0e9fb00a8a4694d442e672c65402621dc67
Reviewed-on: https://skia-review.googlesource.com/6830
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-10 16:25:10 +00:00
Mike Klein
a7080264d1 SkSplicer
I think I may have cracked the compile-ahead-of-time-splice-at-runtime nut.

This compiles stages ahead of time using clang, then splices them together at runtime.  This means the stages can be written in simple C++, with some mild restrictions.

This performs identically to our Xbyak experiment, and already supports more stages.  As written this stands alone from SkRasterPipeline_opts.h, but I'm fairly confident that the bulk (the STAGE implementations) can ultimately be shared.

As of PS 25 or so, this also supports all the stages used by bench/SkRasterPipelineBench.cpp:

    SkRasterPipeline_…
    400  …f16_compile 1x  …f16_run 1.38x  …srgb_compile 1.89x  …srgb_run 2.21x

That is, ~30% faster than baseline for f16, ~15% faster for sRGB.

Change-Id: I1ec7dcb769613713ce56978c58038f606f87d63d
Reviewed-on: https://skia-review.googlesource.com/6733
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-09 17:01:26 +00:00
Mike Klein
7f71d8845c SkXbyak basics
A little JIT proof of concept for SkRasterPipeline, using xbyak, which is a header-only assembler.  It's x86-only, but supports x86 very thoroughly, and it's very user friendly (at least as far as assembler libraries go...).

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ie17e562b0f3fff5914041badfb2c1fe4f86efab8
Reviewed-on: https://skia-review.googlesource.com/5730
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-06 17:45:41 +00:00
Mike Klein
7d92103f9e GN: add skia_android_serial and push_$foo targets when it's set
E.g.
    $ ninja -C out push_dm

By default (ninja -C out) everything is built and pushed if skia_android_serial
is set.  Dependencies are tracked, so incremental builds push only executables
that have changed.

Change-Id: I586d81791f5f877b173cf61ed68fa9aab96234d2
Reviewed-on: https://skia-review.googlesource.com/6616
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-05 19:04:30 +00:00
Derek Sollenberger
70120c778a Add tools to support gdb and simpleperf for android executables.
Change-Id: I6e7f41df094ae037538ebd61e40385d7e2e9eb26
Reviewed-on: https://skia-review.googlesource.com/6615
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-05 17:16:01 +00:00
Mike Klein
e6682eb88c GN: add test_app template
This template encapsulates two common features of our test apps:
  - they set testonly, marking them as safe to use testonly libraries
  - they may want instead to be libapp.so on Android.

I plan to follow up to make test_apps push themselves to an Android device when a new argument android_serial is set.

Change-Id: I010d219c14ff6d0cd6a543dd56fd471a67ddb6f1
Reviewed-on: https://skia-review.googlesource.com/6608
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-05 16:46:17 +00:00
Hal Canary
43fb7a014b BUILD.gn: skia_enable_pdf
BUG=skia:

Change-Id: Icf616bec73e81aad97815b519566ff5b9db611e3
Reviewed-on: https://skia-review.googlesource.com/6495
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-03 14:25:12 +00:00
Brian Osman
3f375d055a Add skia_enable_discrete_gpu argument to GN
This forces all of our testing tools to run with the discrete GPU in
laptop systems that have that option.

BUG=skia:

Change-Id: Ibd7629d6de5f063cdf219b3c7469210af5085d90
Reviewed-on: https://skia-review.googlesource.com/6474
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-28 16:51:17 +00:00
Mike Klein
40a82bd0f4 remove MIPS DSP optimizations
There are only a couple of these, primarily focused on index8 srcs and 565 dsts.  The burden's starting to outweigh the benefit.  No one on the team knows MIPS assembly.

If we're going to try this again, I'd rather we try some sort of SkNx / compiler-intrinsic based approach, probably targeting MIPS SIMD (MSA), not this older instruction set.

We already ignore these files for 64-bit MIPS.  This just closes the loop on 32-bit MIPS.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-mips64el-Debug-Android,Build-Ubuntu-Clang-mips64el-Release-Android,Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-mipsel-Release-Android

BUG=skia:6065

Change-Id: Iecac15b56f59625b2e743ea36e7791b90bb0b422
Reviewed-on: https://skia-review.googlesource.com/6353
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-21 03:55:00 +00:00
Brian Salomon
144a5c518a Rename batch->op in skiaserve
Change-Id: Ib831b9a6bcf4f37c0f077b26f68b1cefef81bb73
Reviewed-on: https://skia-review.googlesource.com/6351
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-20 22:35:23 +00:00
Hal Canary
6ad3d2fa38 xps.gni
Motivation: Since I am activly refactoring SkXPS, I will be needing to
add and subtract sources.  This is the only way to keep chrome and skia
in sync.

TODO(halcanry): follow up in Chrome build files.

BUG=skia:3495

Change-Id: I2bfcbfce7628c34f9a623c6fa806374a10cdbb75
Reviewed-on: https://skia-review.googlesource.com/6350
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-12-20 21:55:50 +00:00
Leon Scroggins
427da6fcbb Revert "Remove all KTX support"
This reverts commit ada12ab055.

Reason for revert: Google3 needs it:
https://test.corp.google.com/ui#id=OCL:142184832:BASE:142184975:1481839118985:32fde8ef

Original change's description:
> Remove all KTX support
> 
> It is untested and unused.
> 
> Change-Id: I010ff4ad942738f362d42a99af4edbbb1cb0cd71
> Reviewed-on: https://skia-review.googlesource.com/6142
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=mtklein@chromium.org,mtklein@google.com,robertphillips@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1ea2f9487eb2212efbfcc514122792b70c9e8737
Reviewed-on: https://skia-review.googlesource.com/6181
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-16 13:52:09 +00:00
Leon Scroggins III
ada12ab055 Remove all KTX support
It is untested and unused.

Change-Id: I010ff4ad942738f362d42a99af4edbbb1cb0cd71
Reviewed-on: https://skia-review.googlesource.com/6142
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-15 21:15:54 +00:00
Leon Scroggins III
95ada6ee73 Remove SkKTXImageEncoder
It escaped the chopping block when we deleted the decoder, but it is
currently untested and unused as far as we know. In addition to
removing effectively unsupported code, this simplifies build file
changes (i.e. don't build it on Android framework, but build it
elsewhere) as we narrow our build systems down to one.

Change-Id: I3b960fdcc369fb947be282933ddba48e407ab3ad
Reviewed-on: https://skia-review.googlesource.com/6031
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-12-14 18:57:58 +00:00
Mike Klein
bde5d5dc2e Revert "Do not build the ktx encoder for android framework"
This reverts commit eeb7137a0b.

Reason for revert: well, duh, I guess we'd better update the GYP and Google3 builds...

Original change's description:
> Do not build the ktx encoder for android framework
> 
> Move SkKTXImageEncoder.cpp into an optional block, and disable that
> block for the android framework. Use a new define to determine whether
> to define the entry point, rather than using
> SK_BUILD_FOR_ANDROID_FRAMEWORK.
> 
> Change-Id: I41103459135af744cf5715f27783c63dc37a7ad1
> Reviewed-on: https://skia-review.googlesource.com/5982
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,mtklein@google.com,scroggo@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I8da75db31884b5148f7f85a6a0c3e6913b71cfa8
Reviewed-on: https://skia-review.googlesource.com/6021
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-14 01:31:53 +00:00
Leon Scroggins III
eeb7137a0b Do not build the ktx encoder for android framework
Move SkKTXImageEncoder.cpp into an optional block, and disable that
block for the android framework. Use a new define to determine whether
to define the entry point, rather than using
SK_BUILD_FOR_ANDROID_FRAMEWORK.

Change-Id: I41103459135af744cf5715f27783c63dc37a7ad1
Reviewed-on: https://skia-review.googlesource.com/5982
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-13 22:13:54 +00:00
Mike Klein
f44703a87f Remove dependency on NDK cpufeatures.
Instead of relying on cpu-features.c, just do what it does.

Good reading: http://man7.org/linux/man-pages/man3/getauxval.3.html

While it's nice to use the headers when possible, should either of these headers not be available, we can fall back to doing it all manually:

  extern "C" uint32_t getauxval(uint32_t)
  static const int AT_HWCAP = 16;
  static const int HWCAP_CRC32 = (1<<7);


To keep things simple I've slimmed cpu feature detection down to just the features we actually make use of.  This removes all runtime feature detection for ARMv7... we expect NEON to be globally available, and so far we haven't used the other FMA/FP16 bits on ARMv7.  ARMv8 feature dection remains the same, CRC32 before, CRC32 after.  x86 (cpuid-based detection) and MIPS (nothing) are untouched.


We need to keep //third_party/cpu-features for //third_party/libwebp.

Change-Id: I6c96df9a09ae68c8c0e54c1152aa177ba9bafc83
Reviewed-on: https://skia-review.googlesource.com/5800
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-12 16:16:44 +00:00
Mike Klein
c30833327f proposed gn_to_bp fixes
in response to 5784

Change-Id: I3ad34a30743e7ffbd04767668c288a4f884eb19c
Reviewed-on: https://skia-review.googlesource.com/5732
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-12 15:18:22 +00:00
Mike Klein
a92c383e2f libviewer.so on Android, delete hello_skia_app
This spins off parts of 5620 to bake while we work through how to do the rest of libviewer.so -> viewer.apk.

Change-Id: I1cbf135cc952eeb7593e80a5a752dcadaa2dbb00
Reviewed-on: https://skia-review.googlesource.com/5656
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-08 16:35:25 +00:00
Florin Malita
ce8840e384 [SVGDom] ClipPath support
* clip-path attribute handling
  * clipPath container element
  * asPath() SkSVGNode virtual for capturing subtree geometry

R=robertphillips@google.com,stephana@google.com

Change-Id: I9597534fe3047b631da6309eafac055dff5696e9
Reviewed-on: https://skia-review.googlesource.com/5650
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2016-12-08 15:00:18 +00:00
Mike Klein
308b5ac681 Add gn_to_bp.py.
The general idea here is, run GN in --ide=json mode to get most information.

Then, read a couple .gni files to get the rest (platform specific source lists, Android framework defines).

For now, I'm generating Android.bp and SkUserConfig.h.  I figure we can do DM and nanobench once these work?

Change-Id: I8e7f60d6572f2d4769760cf872895518a15d841b
Reviewed-on: https://skia-review.googlesource.com/5554
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-06 23:10:34 +00:00
Brian Osman
34755e2cbd Make ANGLE SampleApp work again
The code in views and samplecode wasn't being compiled in. Expand the
scope of the SK_ANGLE define to fix that. Add some missing deps too.

BUG=skia:

Change-Id: Id7b584457a21f171efc2339fb969c550379295e5
Reviewed-on: https://skia-review.googlesource.com/5575
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-05 15:27:50 +00:00
Hal Canary
1fcc40474f SkEncodeImage: no more link-time registration
Also, no more SkImageEncoder class.

SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS now only guards some
old API shims.

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

Change-Id: I3797f584f3e8e12ade10d31e8733163453725f40
Reviewed-on: https://skia-review.googlesource.com/5006
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-11-30 22:48:56 +00:00
Chinmay Garde
130a118cc6 [GN] Create a non-null default native GL interface on iOS.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5212

Change-Id: Ie59cd79687af9eb2530fab8089477c1702e4badc
Reviewed-on: https://skia-review.googlesource.com/5212
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-11-23 20:28:22 +00:00
Hal Canary
db6830162e SkImageEncoder: simplify API
(re-land 248ff02 & 2cb6cb7, with changes)

  - Hide SkImageEncoder class in private header.
  - SkImageEncoder::Type becomes SkEncodedImageFormat
  - SkEncodedFormat becomes SkEncodedImageFormat
  - SkImageEncoder static functions replaced with
    single function EncodeImage()
  - utility wrappers for EncodeImage() are in
    sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

Change-Id: I47d451e50be4d5c6c130869c7fa7c2857243d9f0
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-on: https://skia-review.googlesource.com/5186
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-11-23 16:40:32 +00:00
Hal Canary
a2b4bdce8c Revert 248ff023 & 2cb6cb72
Revert "SkImageEncoder: simplify API"
This reverts commit 248ff02331.
Revert "Fix bug: can't convert nullptr -> bool"
This reverts commit 2cb6cb7218.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151
NOTRY=true

Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec
Reviewed-on: https://skia-review.googlesource.com/5151
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-11-22 21:23:51 +00:00
Kevin Lubick
fec1dea809 FuzzDrawFunctions from twsmith
BUG=skia:

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

Change-Id: Ib5cc6ea036538b611d6959c679a276050e145f57
Reviewed-on: https://skia-review.googlesource.com/4979
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-22 19:45:22 +00:00
Hal Canary
248ff02331 SkImageEncoder: simplify API
- Hide SkImageEncoder class in private header.
  - SkImageEncoder::Type becomes SkEncodedImageFormat
  - SkEncodedFormat becomes SkEncodedImageFormat
  - SkImageEncoder static functions replaced with
    single function EncodeImage()
  - utility wrappers for EncodeImage() are in
    sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

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

Change-Id: Ib48b31fdc05cf23cda7f56ebfd67c841c149ce70
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-11-22 18:25:55 +00:00
Mike Klein
17b6e487b7 Revert "Turn off /arch:AVX[2] on Windows builds."
This reverts commit c89e2438ae.

Reason for revert: 

I'm going to stub this code out in Chrome instead for now.  Chrome's not going to land something that looks like this, so I'd rather undo it than leave Skia in this odd state.

Original change's description:
> Turn off /arch:AVX[2] on Windows builds.
> 
> This canaries a similar change Chrome may need.
> 
> BUG=chromium:666707
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5005
> 
> Change-Id: Ibf7f9941968d905d865b9be1e63ebbf768870175
> Reviewed-on: https://skia-review.googlesource.com/5005
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,brucedawson@chromium.org,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I9562f7877749c61f6ba4d48d6c4b557f09876128
Reviewed-on: https://skia-review.googlesource.com/5069
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-18 22:11:49 +00:00
Mike Klein
c36dedf613 Build fiddle and public_headers_warnings_check only when skia_enable_tools.
This leaves libskia as the only thing we build when tools are not enabled (other GN environments like Fuchsia, Flutter, Chrome, or for people using ours and actively disabling tools).

BUG=skia:

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

Change-Id: I5acad66c1b068ef81c1a7e292c3524a0b1497b66
Reviewed-on: https://skia-review.googlesource.com/4993
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-18 20:26:34 +00:00
Mike Klein
c89e2438ae Turn off /arch:AVX[2] on Windows builds.
This canaries a similar change Chrome may need.

BUG=chromium:666707

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

Change-Id: Ibf7f9941968d905d865b9be1e63ebbf768870175
Reviewed-on: https://skia-review.googlesource.com/5005
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-18 17:59:30 +00:00
Chinmay Garde
43f115cef4 Disable the sources assignment filter for platform specific files.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4918

Change-Id: Ie9e0db55eae5ad7cad82db5270a8bb6e80d3b3bb
Reviewed-on: https://skia-review.googlesource.com/4918
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-17 13:24:50 +00:00
Mike Klein
109ddc386b Don't build :public_headers_warnings_check on NoGPU builds.
skia.h includes GPU headers.  No real point in getting fancy here... if there are no unused parameters in all headers, there are no unused parameters in the subset of non-GPU headers.

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

Change-Id: Iaaea405633aabcc82e40cd4b1a2286aadd5cea17
Reviewed-on: https://skia-review.googlesource.com/4916
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-17 01:26:33 +00:00
Mike Klein
50500ad470 GN: add public headers warnings check.
We already generate skia.h to include all public headers for Fiddle.
This just includes it with -Wunused-parameter turned on as an error.

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

Change-Id: Ia55a901c09a3c9c9d6d35a43259431dba3532ed9
Reviewed-on: https://skia-review.googlesource.com/4901
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-16 19:27:29 +00:00
Ethan Nicholas
4f3985c636 added skslc to BUILD.gn
BUG=skia:

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

Change-Id: I89330cfa4be4d43d9183a8e53b28d6c0061f33e2
Reviewed-on: https://skia-review.googlesource.com/4764
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2016-11-14 17:06:44 +00:00
Mike Klein
c168a3ac3c Revert "Always build the ANGLE test code. Always build ANGLE on windows and linux."
This reverts commit 238b820369.

Reason for revert: breaks 32-bit bots, iOS bots, Google3 roll, -ASAN bot.

Original change's description:
> Always build the ANGLE test code. Always build ANGLE on windows and linux.
> 
> Make ANGLE test code independent of having ANGLE lib. Make ANGLE test code not include EGL headers.
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4040
> 
> DOCS_PREVIEW= https://skia.org/?cl=4040
> 
> Change-Id: I7b857e9785246743f53fb969647b1162ce7419ab
> Reviewed-on: https://skia-review.googlesource.com/4040
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,mtklein@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I19bab8c93baebf032f8a4cefbedfe7359317e806
Reviewed-on: https://skia-review.googlesource.com/4758
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-14 14:53:23 +00:00
Brian Salomon
238b820369 Always build the ANGLE test code. Always build ANGLE on windows and linux.
Make ANGLE test code independent of having ANGLE lib. Make ANGLE test code not include EGL headers.

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

DOCS_PREVIEW= https://skia.org/?cl=4040

Change-Id: I7b857e9785246743f53fb969647b1162ce7419ab
Reviewed-on: https://skia-review.googlesource.com/4040
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-14 14:34:11 +00:00
James Robinson
14b748ddd2 [gn] Disable use of dng SDK in Fuchsia
These libraries aren't configured in Fuchsia and would need some GN
reworking to enable. We can wire this up in Fuchsia if/when this
capability when needed.

Change-Id: Iec2d339da07f44516592d6114563a8a4fb59d952
Reviewed-on: https://skia-review.googlesource.com/4744
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-13 13:10:09 +00:00
Matt Sarett
8740d5802b Re-purpose color space tool
(1) Compile tool with GN.
(2) Rename tool to colorspaceinfo.
(3) Support both images and icc profiles as input.
(4) Print out information on transfer fn in addition to gamut.

TODO: Output graphs of the three transfer fn curves.

BUG=skia:

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

Change-Id: I2e75139685ea41446d3ae6f9803c8068ea05661a
Reviewed-on: https://skia-review.googlesource.com/4721
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-11-11 19:31:09 +00:00
Mike Klein
38af9438d7 GN: build Lua tools when skia_use_lua.
When we opt into Lua, this builds SampleLua into SampleApp, and the lua_app and lua_pictures tools.

I've tested this builds with and without skia_use_system_lua on my Mac laptop and Linux desktop.

I've made lua_pictures.cpp's flags static to avoid conflicts with flags in SkCommonFlags.cpp.

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

DOCS_PREVIEW= https://skia.org/?cl=4699

Change-Id: I8176fd51d8a38746e7d730cfcce66da42b9a015a
Reviewed-on: https://skia-review.googlesource.com/4699
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-11 17:34:36 +00:00
Florin Malita
442fff958c Revert "Revert "GN: define SK_XML to indicate :xml is enabled.""
This reverts commit 7e8f80a084.

Reason for revert: the SVG DM flakiness should be fixed by now.

Original change's description:
> Revert "GN: define SK_XML to indicate :xml is enabled."
> 
> This reverts commit 7234448c11.
> 
> Reason for revert: this enabled tests which are making the bots flaky.
> 
> Original change's description:
> > GN: define SK_XML to indicate :xml is enabled.
> > 
> > Without this, nothing ever defines SK_XML for dm/DM.cpp, dm/DMSrcSink.cpp, tests/SkDOMTest.cpp or tests/SkPEGTest.cpp.
> > 
> > GYP does something similiar in gyp/xml.gyp.
> > 
> > BUG=skia:
> > 
> > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4500
> > 
> > Change-Id: I93322722d6d86f5802495d7a2edad2f82ba36f69
> > Reviewed-on: https://skia-review.googlesource.com/4500
> > Reviewed-by: Hal Canary <halcanary@google.com>
> > Commit-Queue: Eric Boren <borenet@google.com>
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> > 
> 
> TBR=mtklein@chromium.org,borenet@google.com,halcanary@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I46c198f4985f6e7f96c07b3100a3877ba46fdb18
> Reviewed-on: https://skia-review.googlesource.com/4526
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,borenet@google.com,halcanary@google.com,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic3225f119dff3c6949a3b559ac60707d36bc3792
Reviewed-on: https://skia-review.googlesource.com/4544
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-11-08 16:08:04 +00:00
Mike Klein
7e8f80a084 Revert "GN: define SK_XML to indicate :xml is enabled."
This reverts commit 7234448c11.

Reason for revert: this enabled tests which are making the bots flaky.

Original change's description:
> GN: define SK_XML to indicate :xml is enabled.
> 
> Without this, nothing ever defines SK_XML for dm/DM.cpp, dm/DMSrcSink.cpp, tests/SkDOMTest.cpp or tests/SkPEGTest.cpp.
> 
> GYP does something similiar in gyp/xml.gyp.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4500
> 
> Change-Id: I93322722d6d86f5802495d7a2edad2f82ba36f69
> Reviewed-on: https://skia-review.googlesource.com/4500
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Eric Boren <borenet@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,borenet@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I46c198f4985f6e7f96c07b3100a3877ba46fdb18
Reviewed-on: https://skia-review.googlesource.com/4526
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-07 20:55:22 +00:00
Mike Klein
7234448c11 GN: define SK_XML to indicate :xml is enabled.
Without this, nothing ever defines SK_XML for dm/DM.cpp, dm/DMSrcSink.cpp, tests/SkDOMTest.cpp or tests/SkPEGTest.cpp.

GYP does something similiar in gyp/xml.gyp.

BUG=skia:

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

Change-Id: I93322722d6d86f5802495d7a2edad2f82ba36f69
Reviewed-on: https://skia-review.googlesource.com/4500
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-07 18:31:14 +00:00
Mike Klein
7d3028818e GN: iOS basics
This doesn't create any apps or bundles or sign anything, but it all compiles and links.

Note the awkward transitional hack I used to make each tool's tool_main() serve as the real main() again when built with GN, while keeping the existing setup with GYP.  Fun...

BUG=skia:

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

Change-Id: I632753d5d8e5848380854f413bf5905d676bfcf4
Reviewed-on: https://skia-review.googlesource.com/4350
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 19:31:50 +00:00
Mike Klein
89eda8a5e3 Streamline skia.h construction.
This moves the work of finding headers from `gn gen` time into the action itself.  We can do this safely now because we're constructing a skia.h.d deps file, which Ninja uses to track if-these-are-dirty-then-this-is-dirty relationships.  Everything can now live in one handy find_headers.py.

Upshot is, `gn gen` runs ~50ms faster, and I think the code's clearer this way too.

BUG=skia:

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

Change-Id: I2f1e7adf68be8e961eb77596786a795134bbb9a6
Reviewed-on: https://skia-review.googlesource.com/4065
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 17:28:39 +00:00
Kevin Lubick
2f535cecd0 Make fuzzers use cleaner interface
signalBoring() no longer exists.  When the fuzzer runs out of randomness,
it just returns 0.  Fuzzers should not go into infinite loops if this
happens.  do while loops are particularly error-prone.

BUG=skia:

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

Change-Id: Iebcfc14cc6b0a19c5dd015cd39875c81fa44003e
Reviewed-on: https://skia-review.googlesource.com/3963
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-01 19:23:16 +00:00
Mike Klein
10d665d000 Allow most third_party targets to use system libraries if asked.
This extends the pattern in freetype2 to expat, icu, libjpeg-turbo, libpng, libwebp, and zlib, and gives all these an arg to control which to use.

Homebrew doesn't have dng_sdk, piex, or sftnly, or I'd have done the same for them too.

BUG=skia:

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

DOCS_PREVIEW= https://skia.org/?cl=4260

Change-Id: I82e780502bf2217336e791787f172a6fc8f55460
Reviewed-on: https://skia-review.googlesource.com/4260
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-11-01 16:17:38 +00:00
Mike Klein
4d598a35cd Fork skia_vulkan_sdk default value on is_android.
BUG=skia:

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

Change-Id: I091801af7e5e0093ef01a5708c0994928997ddf3
Reviewed-on: https://skia-review.googlesource.com/4205
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-31 18:41:13 +00:00
Greg Daniel
ab563d4719 Minor fix to GN for vulkan android builds
BUG=skia:

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

Change-Id: Ib6a630bbdaf503ff44fbc699aaffdf13ee9c2b59
Reviewed-on: https://skia-review.googlesource.com/4155
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-10-31 17:03:43 +00:00
scroggo
f84ad646f9 Reland "Build SkRawCodec in GN"
Add BUILD.gn files for dng_sdk and piex and updated BUILD.gn to
build SkRawCodec.

We stopped testing raw images when we switched to GN, so this will
bring back our testing.

Leave SkRawCodec disabled on Windows, where we've had problems in the
past.

Originally landed in issue 4603. Reverted due to build errors.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2463433002

Review-Url: https://codereview.chromium.org/2463433002
2016-10-31 09:02:57 -07:00
Jim Van Verth
8f5468f022 Fix GN config for skpbench
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4154

Change-Id: I817ce9d8baa72200c622e38e954c81ea37bd99e8
Reviewed-on: https://skia-review.googlesource.com/4154
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-31 14:29:32 +00:00
Jim Van Verth
57a98fc4d5 Add GN config for Mac SampleApp
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4077

Change-Id: I67e4456c8ccdb5413e86c442b759f6dff4de651b
Reviewed-on: https://skia-review.googlesource.com/4077
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2016-10-28 18:00:51 +00:00
Jim Van Verth
b6c5e53796 Add SampleApp support to GN (win and linux), take two.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4075

Change-Id: I2b25c3e48992e63d2990c8ac77363eff4ddd926d
Reviewed-on: https://skia-review.googlesource.com/4075
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2016-10-28 15:20:26 +00:00
Leon Scroggins
2ce47630fe Revert "Build SkRawCodec in GN"
This reverts commit 04b1f461aa.

Reason for revert: Breaking build bots


TBR=mtklein@chromium.org,mtklein@google.com,scroggo@google.com,adaubert@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I26c71116ad19b3c494fd632fcc6309bc2ae0d828
Reviewed-on: https://skia-review.googlesource.com/4100
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-10-28 14:09:52 +00:00
Leon Scroggins III
04b1f461aa Build SkRawCodec in GN
Add BUILD.gn files for dng_sdk and piex and updated BUILD.gn to
build SkRawCodec.

We stopped testing raw images when we switched to GN, so this will
bring back our testing.

Leave SkRawCodec disabled on Windows, where we've had problems in the
past.

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

Change-Id: I956949506200b766a2f7efb18e0486f3a2f93a1c
Reviewed-on: https://skia-review.googlesource.com/4063
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-10-28 13:46:29 +00:00
Mike Klein
142d4e9c31 Revert "Add SampleApp support to GN-win"
This reverts commit a70558e2bb.

Reason for revert: 

cmd /c c:\b\s\w\ireutzd9\t\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97/win_sdk/bin/SetEnv.cmd /x86 && c:\b\s\w\ireutzd9\t\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97/VC/bin/amd64_x86/cl.exe /nologo /showIncludes /FC @obj/samplecode/SampleApp.SampleApp.obj.rsp /c ../../../samplecode/SampleApp.cpp /Foobj/samplecode/SampleApp.SampleApp.obj /Fd"obj/SampleApp_c.pdb"
c:\b\work\skia\include\views\skoswindow_win.h(18): fatal error C1083: Cannot open include file: 'EGL/egl.h': No such file or directory

I think this is restricted to just 32-bit Windows builds?

Original change's description:
> Add SampleApp support to GN-win
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4062
> 
> Change-Id: I88b10748b49adbf57f247b51eec1b9ca86377800
> Reviewed-on: https://skia-review.googlesource.com/4062
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> 

TBR=mtklein@chromium.org,mtklein@google.com,jvanverth@google.com,caryclark@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iba39bab6d3a07a437a86343599e51485d8f4ce93
Reviewed-on: https://skia-review.googlesource.com/4070
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-10-27 21:34:15 +00:00
Jim Van Verth
a70558e2bb Add SampleApp support to GN-win
BUG=skia:

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

Change-Id: I88b10748b49adbf57f247b51eec1b9ca86377800
Reviewed-on: https://skia-review.googlesource.com/4062
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2016-10-27 20:49:51 +00:00
Mike Klein
6e74412a9c Create .gni files for samples, tests, gms, and benches.
Calling Python to find all these files is convenient, but error-prone.  It's easy to forget to call GN again when adding a file.  Each of these calls to Python also adds ~50ms to the run time of gn gen, which is small but adds up.

On my desktop, gn gen drops from 600ms to 150ms, noticeably faster.

This leaves one call to find.py for generating skia.h for fiddle.  We're not quite sure how to automate that process to happen entirely inside the :skia.h action while maintaining correct dependencies, so I'm leaving it for now.

BUG=skia:

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

Change-Id: Ib9d355b97900f29afebc65311ceef50537e46dda
Reviewed-on: https://skia-review.googlesource.com/4036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-27 18:14:06 +00:00
Brian Salomon
23d73ea5b4 Restore the ability to not build vulkan when VULKAN_SDK is set
After https://skia.googlesource.com/skia/+/686bb21f3ed19218a85e94798fe50e240e3fac08 skia_use_vulkan=false stopped working when VULKAN_SDK is set in the environment.

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

Change-Id: I3707c930d041556d1727f43c48eba2cad73349eb
Reviewed-on: https://skia-review.googlesource.com/4038
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-10-27 17:56:24 +00:00
Greg Daniel
686bb21f3e Default vulkan sdk to VULKAN_SDK env var in GN
BUG=skia:

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

Change-Id: I48767cbbe7e0cd306e448bdc983c853f66121e1b
Reviewed-on: https://skia-review.googlesource.com/4032
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2016-10-27 15:33:19 +00:00
Mike Klein
cfc4f44aeb gypi -> gni: core, effects, android framework defines
BUG=skia:

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

Change-Id: I29a26c1716a319156a34a64999756ed7dba1e603
Reviewed-on: https://skia-review.googlesource.com/4023
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 21:44:49 +00:00
Mike Klein
6e55fef07f GN: spin off :no_exceptions as its own config.
BUG=skia:

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

Change-Id: Ibaa10b9b6f566958b7e6622eedbc30a7010260b3
Reviewed-on: https://skia-review.googlesource.com/4001
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 17:08:53 +00:00