Commit Graph

345 Commits

Author SHA1 Message Date
Greg Daniel
b76a72a659 Add support for creating a GrContext backed by Metal.
Also adds the support code to allow our TestContext to create a Metal
backend.

Bug: skia:
Change-Id: Ia850687019d79b897bb16e2c151f4f8526721ad9
Reviewed-on: https://skia-review.googlesource.com/22644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-13 21:29:33 +00:00
Greg Daniel
6b7e0e2c74 Add arc support to gpu Obj c++ code
This is mainly for getting ready to start adding lots of metal backend code.
I've also update the "gpu tools" target to require ARC with involved updating
one IOS file in there.

Bug: skia:
Change-Id: Ied22e8fe7532445cc274efb529e3450654a6614b
Reviewed-on: https://skia-review.googlesource.com/22484
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-12 20:49:32 +00:00
Leon Scroggins III
51b2f1b64c Stop adding Android-specific defines to SkUserConfig
Remove #defines that lived in gn_to_bp.py and
android_framework_defines.gni. These have been moved into a new file
in Android, SkUserConfigManual.h, in https://googleplex-android-review.git.corp.google.com/#/c/2519600/

Update gn_to_bp.py to include SkUserConfigManual.h, so it will still
result in using the same #defines.

Lately, we've found it difficult to guard changes behind a flag. e.g.
a change to drawing causes a CTS failure in Android, so we have to do
the following:
- put the change behind a flag, and add it to gn_to_bp.py or
android_framework_defines.gni
- generate new images on Android (by running CTS with external/skia
modified to not define the flag)
- create a CL in CTS that uses the new images
- land a CL in Skia that stops defining the flag
- when the Skia change lands, wait for the auto-roller to create a CL
that includes the change, stop the auto-roller, add the topic to the CTS
CL so the two can land at the same time
- land both Android changes (with TreeHugger)
- restart the Android auto-roller

With SkUserConfigManual.h (which lives in Android), the process will
be similar to Chromium:
- land a CL in Android's external/skia that defines a flag e.g.
SK_SUPPORT_LEGACY_FEATURE. Land without TreeHugger because it isn't used
in Skia and does not do anything
- land a change in Skia that changes behavior unless
SK_SUPPORT_LEGACY_FEATURE is defined. This will safely go through the
Android roll and not change any behavior for Android
- create two Android CLs - one in CTS to use the new images, and one in
external/skia to delete SK_SUPPORT_LEGACY_FEATURE. Set them to the same
topic and land them with TreeHugger

In the new process, there is no need to mess with the Android roll.

A downside to the new process is that we cannot test the android
framework defines without checking in to Android. But given how much
we've progressed in automating Android testing, this is fine.

Bug: b/63429612
Change-Id: Idfbaef2f4cae641a75fb6e7bf70428733a441336
Reviewed-on: https://skia-review.googlesource.com/22072
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-07-11 20:43:35 +00:00
Jim Van Verth
4c70c75d0a Update SkiaSDLExample to latest Ganesh interfaces.
Also updates SDL to 2.0.5.

Change-Id: I3a3c8f69360fc20a3d543c19dcf82dd3f42f1309
Reviewed-on: https://skia-review.googlesource.com/22204
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-07-11 16:34:21 +00:00
Brian Salomon
cfe910dc79 Revert "Revert "Make mock GrContext unit testable.""
This reverts commit c867a89b01.

Reason for revert: test

Original change's description:
> Revert "Make mock GrContext unit testable."
> 
> This reverts commit 993e7e2521.
> 
> Reason for revert: Seeing if this fixes the NexusPlayer bots
> 
> Original change's description:
> > Make mock GrContext unit testable.
> > 
> > Bug: skia:
> > Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
> > Reviewed-on: https://skia-review.googlesource.com/20699
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: I25ed9329962d930fe38108f779ff7083e0e4847e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/21731
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I62c579e087db1ff9891cf6c41b3eb40f47561887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21733
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 21:59:18 +00:00
Brian Salomon
c867a89b01 Revert "Make mock GrContext unit testable."
This reverts commit 993e7e2521.

Reason for revert: Seeing if this fixes the NexusPlayer bots

Original change's description:
> Make mock GrContext unit testable.
> 
> Bug: skia:
> Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
> Reviewed-on: https://skia-review.googlesource.com/20699
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com

Change-Id: I25ed9329962d930fe38108f779ff7083e0e4847e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/21731
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 18:21:37 +00:00
Brian Salomon
993e7e2521 Make mock GrContext unit testable.
Bug: skia:
Change-Id: I959122f1f2c390832ab1033bcdbdd2ca6cfc0419
Reviewed-on: https://skia-review.googlesource.com/20699
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-06 15:25:35 +00:00
Brian Salomon
0c26a9dbd0 GR_TEST_UTILS fixes
Fixes build of Skia lib when GR_TEST_UTILS=0

Makes GR_TEST_UTILS=0 for official builds

Makes "Mini" builder bot exercise building GPU with is_official_build=true

Bug: skia:6786
Change-Id: I6186683a3a216d2e779645bd9e8276a66bcff4d5
Reviewed-on: https://skia-review.googlesource.com/21524
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-07-06 14:35:45 +00:00
Greg Daniel
e5ddff5553 Add basic metal build files for backend
Bug: skia:
Change-Id: Iddeeb91b378bdb61d200070d8faa3610299ab733
Reviewed-on: https://skia-review.googlesource.com/21533
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-05 21:12:40 +00:00
Ethan Nicholas
762466e9fe Re-re-land sksl fragment processor support
This reverts commit 5ce3972055.

Bug: skia:
Change-Id: I88260c90004610a1cf8ad1a87c2b4b222525bbb6
Reviewed-on: https://skia-review.googlesource.com/21108
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-29 14:57:47 +00:00
Mike Klein
c55a6cb05f build regenerating SkJumper stages into GN
I _think_ this makes it so changes to _stages.cpp or _lowp.cpp get
noticed, regenerated, and baked into Skia all in the same Ninja
invocation.

Now you just need to set up the tools we use in GN:

  skia_jumper_clang = ...
  skia_jumper_objdump = ...
  skia_jumper_ccache = ...

Change-Id: I09fb54d965644ff6e5825056fb0be2c7cab2ea92
Reviewed-on: https://skia-review.googlesource.com/21140
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-28 18:22:16 +00:00
Mike Klein
5ce3972055 Revert "Re-land sksl fragment processor support"
This reverts commit c070939fd1.

Reason for revert: 

This has some knock-on effects in the generation of Android.bp from our GN files.  See gn/gn_to_bp.py?  We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there...

Original change's description:
> Re-land sksl fragment processor support
> 
> This reverts commit ed50200682.
> 
> Bug: skia:
> Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
> Reviewed-on: https://skia-review.googlesource.com/20965
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I502486b5405923b322429219f4cc396a45a14cea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20990
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-06-27 22:52:10 +00:00
Derek Sollenberger
7a86987815 Use the NDK headers for AHardwareBuffer.
Bug: 6672
Change-Id: I5abd86149e912d91234853109ebd2a6b0ac5eaa2
Reviewed-on: https://skia-review.googlesource.com/20980
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-06-27 20:28:13 +00:00
Ethan Nicholas
c070939fd1 Re-land sksl fragment processor support
This reverts commit ed50200682.

Bug: skia:
Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
Reviewed-on: https://skia-review.googlesource.com/20965
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 18:27:57 +00:00
Ethan Nicholas
ed50200682 Revert "sksl fragment processor support"
This reverts commit ccf59917d3.

Reason for revert: breaking iOS bots

Original change's description:
> sksl fragment processor support
> 
> Bug: skia:
> Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
> Reviewed-on: https://skia-review.googlesource.com/17843
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I0a33060c7c42c7b44c5c13d443ac42958291c2f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 14:36:44 +00:00
Ethan Nicholas
ccf59917d3 sksl fragment processor support
Bug: skia:
Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
Reviewed-on: https://skia-review.googlesource.com/17843
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-27 14:20:05 +00:00
Brian Osman
cff94e407e Move threaded BMP device to samples
Currently only referenced by SampleApp, and this squelches false positive
warnings from Clang's thread safety analysis when clients build this code.

Bug: skia:
Change-Id: I710fdc882e05fc5b80977139237028d1408f17db
Reviewed-on: https://skia-review.googlesource.com/20831
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-26 17:42:00 +00:00
Robert Phillips
fcd5fddb02 Revert "Revert "Update skia to use ifdefs for Vulkan code instead of dummy header""
This reverts commit fad9e3f541.

Reason for revert: Can't find the error message anymore (?!?) Let's try again shall we

Original change's description:
> Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
> 
> This reverts commit c0f8e426c5.
> 
> Reason for revert: Experiment to see if this will unblock the Android roll
> 
> Original change's description:
> > Update skia to use ifdefs for Vulkan code instead of dummy header
> > 
> > Bug: skia:6721
> > Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> > Reviewed-on: https://skia-review.googlesource.com/19547
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com
> 
> Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6721
> Reviewed-on: https://skia-review.googlesource.com/19724
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: Iecef7ddcfe31d82938336120a4193525ac6693be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19782
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-14 01:43:38 +00:00
Robert Phillips
fad9e3f541 Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"
This reverts commit c0f8e426c5.

Reason for revert: Experiment to see if this will unblock the Android roll

Original change's description:
> Update skia to use ifdefs for Vulkan code instead of dummy header
> 
> Bug: skia:6721
> Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
> Reviewed-on: https://skia-review.googlesource.com/19547
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com

Change-Id: Ib51c1672570f2071a17b6fbde692a5174b0358ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6721
Reviewed-on: https://skia-review.googlesource.com/19724
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-13 22:16:19 +00:00
Greg Daniel
c0f8e426c5 Update skia to use ifdefs for Vulkan code instead of dummy header
Bug: skia:6721
Change-Id: I80a4c9f2acc09c174497f625c50ed12a8bb76505
Reviewed-on: https://skia-review.googlesource.com/19547
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-13 18:50:03 +00:00
Leon Scroggins III
d81fed9ce2 Replace BMP calls to new with calls to malloc
A BMP can have an arbitrarily large width. We typically read a row
into a block of memory before swizzling it to the output. Rather
than calling new to create that block of memory, which may crash
when we run out of memory, call malloc, and return null if malloc
fails.

Add a common base class for Mask and Standard BMP codecs. This class
handles allocating and freeing the buffer.

Bug: b/37623797
Change-Id: I0510b76d688d030865faa481bb2fb1351dac2c97
Reviewed-on: https://skia-review.googlesource.com/18400
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-06-05 15:09:40 +00:00
Joe Gregorio
a8fabd3f28 Fiddle can use EGL if available.
To test this turn on egl, e.g. --args='skia_use_egl=true', and run by altering the
library path to point to the right directory of the EGL driver you want to use, for example:

  LD_LIBRARY_PATH=/usr/lib/nvidia-367/ ./out/Release/fiddle  | ./tools/fiddle/parse-fiddle-output 

Bug: skia:
Change-Id: I2cce80318925fe88f9407646acb67628a8e48810
Reviewed-on: https://skia-review.googlesource.com/18137
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-31 14:23:56 +00:00
Florin Malita
5edba45dca [Reland] Relocate shaders to own dir
Consolidate all shader impls under src/shaders/.

(reland of https://skia-review.googlesource.com/c/17927/)

Change-Id: I7918bdc1aafe842ed194412ba95b9ae53a2ec1d7
Reviewed-on: https://skia-review.googlesource.com/18146
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-30 21:01:46 +00:00
Mike Reed
f2ae2b2dbc move perlinenoise2 into effects
Bug: skia:
Change-Id: I5c178bdc5901d15c6924b3fb1f29119ab3cc701d
Reviewed-on: https://skia-review.googlesource.com/18131
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-05-30 20:15:37 +00:00
Stan Iliev
d8872be505 Revert "Relocate shaders to own dir"
This reverts commit fabe0b26d0.

Reason for revert: Last android roll failed with "external/skia/src/effects/SkGaussianEdgeShader.h:11:10: fatal error: 'SkShaderBase.h' file not found"

Original change's description:
> Relocate shaders to own dir
> 
> Consolidate all shader impls under src/shaders/.
> 
> Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3
> Reviewed-on: https://skia-review.googlesource.com/17927
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>
> 

TBR=mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com
No-Presubmit: true
No-Tree-Checks: true
No-Try: true

Change-Id: Idbb2b75053969df1dad9d8ce0217cd39189b9ddb
Reviewed-on: https://skia-review.googlesource.com/18020
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-05-25 22:30:19 +00:00
Florin Malita
fabe0b26d0 Relocate shaders to own dir
Consolidate all shader impls under src/shaders/.

Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3
Reviewed-on: https://skia-review.googlesource.com/17927
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-05-25 20:05:08 +00:00
Robert Phillips
92de631edd Remove compressed (ETC1) texture support from Ganesh (take 2)
Reland of https://skia-review.googlesource.com/c/17456/ (Remove compressed (ETC1) texture support from Ganesh) but w/o removing third_part\etc1 files

TBR=bsalomon@google.com
Change-Id: I8ec4b7e3ddf47d213cb24c382731c050ffb8847f
Reviewed-on: https://skia-review.googlesource.com/17700
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-05-23 12:45:21 +00:00
Brian Osman
bc262e110a Revert "Remove compressed (ETC1) texture support from Ganesh"
This reverts commit ee26363aaa.

Reason for revert: Failing Google 3 roll.

Original change's description:
> Remove compressed (ETC1) texture support from Ganesh
> 
> Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
> Reviewed-on: https://skia-review.googlesource.com/17456
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie1a57187287e03600a69e374501478e93c41415c
Reviewed-on: https://skia-review.googlesource.com/17527
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-22 20:14:50 +00:00
Robert Phillips
ee26363aaa Remove compressed (ETC1) texture support from Ganesh
Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
Reviewed-on: https://skia-review.googlesource.com/17456
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-22 18:02:52 +00:00
Matt Sarett
9f1c403362 Add tool to create test images with interesting color profiles
Bug: skia:
Change-Id: Ia4f892368fceda4a99490f5bd29851837a7a6927
Reviewed-on: https://skia-review.googlesource.com/17212
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-17 18:15:20 +00:00
Mike Klein
62669ad29c ok, add timer via
Change-Id: I3d25a2aa9ae6dacb52779142cea062c7d9df40f5
Reviewed-on: https://skia-review.googlesource.com/16238
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 22:00:39 +00:00
Matt Sarett
94fd06f074 Move SkPngEncoder into public API
Bug: 713862
Change-Id: I45068ed39affe41ffe0f29bf42c5ea1d9b0247ba
Reviewed-on: https://skia-review.googlesource.com/15897
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-09 17:46:30 +00:00
Matt Sarett
04c3731de8 SkEncoder: Rename files, change webp API, for consistency
Bug: skia:
Change-Id: I3dd6feb3d5661dcad3d2388b4d01fa9d3bbb15bb
Reviewed-on: https://skia-review.googlesource.com/15631
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-05 18:56:46 +00:00
Mike Reed
a9e241d357 drawfilter is legacy-guarded, no need for deprecated
Bug: skia:
Change-Id: Ic8dbe9aa043bd793e49975f5b6f08a0ac38e4faa
Reviewed-on: https://skia-review.googlesource.com/15185
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-03 15:46:55 +00:00
Brian Salomon
5db010bfb5 Link to vulkan in tools but not library.
This also now requires an explicit vulkan proc address getter to be used with GrVkBackendContext::Create.

Change-Id: I768ec487398dab68e6e10409419ac7a00ec1822a
Reviewed-on: https://skia-review.googlesource.com/14322
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-04-26 12:50:03 +00:00
Greg Daniel
ec6ae52168 Use system Vulkan headers except when no building with vulkan support
We now will always use the system vulkan.h files whenever we are building
with vulkan. With non vulkan builds we use our checked in header to so
that we can get the needed symbols for compiling.

Bug: skia:
Change-Id: I352a3e007b33c575cefcfd6752db0b3b12b86a16
Reviewed-on: https://skia-review.googlesource.com/14270
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-25 18:30:37 +00:00
Greg Daniel
c819e66993 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reland of the reverted cl: https://skia-review.googlesource.com/13804

Bug: skia:
Change-Id: I9023e80e60d2f2ebbdc8e794ec46d6f5c5c7c917
Reviewed-on: https://skia-review.googlesource.com/13874
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 13:09:27 +00:00
Joe Gregorio
1e735c0256 [fiddle] Add simple animation support.
BUG=skia:

Change-Id: I6453afb1fe18e210d3c505b56777b8b19501ca2f
Reviewed-on: https://skia-review.googlesource.com/13810
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2017-04-19 18:46:52 +00:00
Greg Daniel
5238f994bf Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit 3a3bc42b7d.

Reason for revert: still breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> This is a reupload of CL: https://skia-review.googlesource.com/13651
> 
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 14:44:47 +00:00
Greg Daniel
3a3bc42b7d Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reupload of CL: https://skia-review.googlesource.com/13651

Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 13:58:52 +00:00
Greg Daniel
df07ddd1f0 Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit edbb7d8860.

Reason for revert: breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> Bug: skia:
> Change-Id: I674a253308596dc75bd23574984ae933923679f9
> Reviewed-on: https://skia-review.googlesource.com/13651
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

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

Change-Id: I179647e6ae213b1b17a9c42ced5e98c6599b96c2
Reviewed-on: https://skia-review.googlesource.com/13774
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 01:22:52 +00:00
Greg Daniel
edbb7d8860 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

Bug: skia:
Change-Id: I674a253308596dc75bd23574984ae933923679f9
Reviewed-on: https://skia-review.googlesource.com/13651
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-18 19:35:22 +00:00
Forrest Reiling
30229ac628 Fix Fuchsia Vulkan build control
Our last patch here ran into some problems because some people build a
subset of fuchsia that does not include skia, so setting skia_use_vulkan
breaks their build. This relies on buildargs set from a fuchsia global
GNI file to allow us to set them independently of skia in our build
system

Change-Id: I64f5f0f349c12947c8aff7761dc5fafdb6a91b6c
Reviewed-on: https://skia-review.googlesource.com/13617
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-17 23:31:33 +00:00
Michael Jurka
da3e596015 Set build vars for Vulkan backend on Fuchsia.
BUG=skia:

Change-Id: I355209a170ad8930a59cf91d584f40de82f51b92
Reviewed-on: https://skia-review.googlesource.com/13563
Reviewed-by: Forrest Reiling <freiling@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-15 12:01:16 +00:00
Greg Daniel
50130e427c Allow including of vulkan.h as a required public api when using vulkan.
Bug: skia:
Change-Id: I3ac382edc12144dcda9ef168f752b14878e0e5ac
Reviewed-on: https://skia-review.googlesource.com/13262
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-12 18:24:25 +00:00
Hal Canary
45cde31b2e SkMultiPictureDocument : clean up MultiPictureDocumentReader interface
Motivation:  We may want to make SkMultiPictureDocument.h public in the
future.

Change-Id: Ie97b88d51a179c2283155d65bcadee32178115ca
Reviewed-on: https://skia-review.googlesource.com/11402
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-04-07 15:55:38 +00:00
Michael Jurka
3251ed8405 Refactor Vulkan support to support Fuchsia
- Refactor runtime lookup of Vulkan functions
- Support Magma surfaces
- Add build flags to toggle Vulkan support

BUG=skia:

Change-Id: Ic71965c453507882521443006c4155c7481a9a3f
Reviewed-on: https://skia-review.googlesource.com/9342
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Jurka <mikejurka@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-05 17:32:09 +00:00
Ethan Nicholas
0df1b04db8 skslc can now be compiled with no Skia dependencies, in preparation for its eventual
This reverts commit 9bd301d640.

Bug: skia:
Change-Id: I5ad3f77ef33aa5ce2fd27fe383c9339c571663a1
Reviewed-on: https://skia-review.googlesource.com/10964
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-03-31 18:49:51 +00:00
Ethan Nicholas
9bd301d640 Revert "skslc can now be compiled with no Skia dependencies, in preparation for its eventual"
This reverts commit f3333c89bf.

Reason for revert: breaking the bots

Original change's description:
> skslc can now be compiled with no Skia dependencies, in preparation for its eventual
> role in Skia's build process.
> 
> This reverts commit bcf35f86d5.
> 
> BUG=skia:
> 
> Change-Id: Id0a12dfc4d804d69a3c6bf60fed37e89ee130f02
> Reviewed-on: https://skia-review.googlesource.com/10802
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> 

TBR=benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ic7b50d391d25b3870acffa9764cbafc7f5c3be89
Reviewed-on: https://skia-review.googlesource.com/10962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-03-31 16:04:41 +00:00
Ethan Nicholas
f3333c89bf skslc can now be compiled with no Skia dependencies, in preparation for its eventual
role in Skia's build process.

This reverts commit bcf35f86d5.

BUG=skia:

Change-Id: Id0a12dfc4d804d69a3c6bf60fed37e89ee130f02
Reviewed-on: https://skia-review.googlesource.com/10802
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-03-31 15:25:32 +00:00
Mike Klein
0a64e32f39 Turn on SkJumper all the time, try 2.
Rebased on top of _win.S change, which I hope lands first.

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel,win_chrome_official,win_chromium_dbg_ng,win_chromium_rel_ng,win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng,win_clang;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Change-Id: I30e97dbb55b8a42251b46f5607096ca12bc670b9
Reviewed-on: https://skia-review.googlesource.com/10462
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-03-30 20:15:11 +00:00
Mike Klein
5f80485a53 make _win.S know if it's 64-bit
I think this is the root of my Windows / Chrome problems.
Even on 32-bit builds, Chrome compiles nacl64.exe in 64-bit mode.

So to make things simple, always put _win.S in the sources,
and no-op it away when assembling for 32-bit.

Change-Id: I19f163491739a6c0cbdedd0ce353f1d2289907ae
Reviewed-on: https://skia-review.googlesource.com/10637
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-30 18:45:19 +00:00
Ethan Nicholas
bcf35f86d5 Revert "skslc can now be compiled with no Skia dependencies, in preparation for"
This reverts commit 7833466da4.

Reason for revert: Vulkan assertion failure

Original change's description:
> skslc can now be compiled with no Skia dependencies, in preparation for
> its eventual role in Skia's build process.
> 
> Bug: skia:
> Change-Id: Iaa9933f4fc4a64bec60aa897c509a3513f457a78
> Reviewed-on: https://skia-review.googlesource.com/10282
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> 

TBR=egdaniel@google.com,benjaminwagner@google.com,ethannicholas@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic64cac2395abb406116885ddd725f74a434c8c49
Reviewed-on: https://skia-review.googlesource.com/10758
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-03-30 18:42:59 +00:00
Ethan Nicholas
7833466da4 skslc can now be compiled with no Skia dependencies, in preparation for
its eventual role in Skia's build process.

Bug: skia:
Change-Id: Iaa9933f4fc4a64bec60aa897c509a3513f457a78
Reviewed-on: https://skia-review.googlesource.com/10282
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-03-30 18:28:47 +00:00
Mike Klein
d7e06aec7e jumper, revert to generating .S files
I went with the unified-in-one-.cpp approach mostly to make it easy to
roll out SkJumper.  I no longer see any difficultly rolling out the
assembly files, and it's possible the unified .cpp approach just makes
things harder.

Let's see if it's any easier to get Chrome's official build to work with
normal assembly files.  It's not going to be a problem to roll out.

This is a partial revert of https://skia-review.googlesource.com/c/9336.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: Idfdbd2d322452b44bc0adaf6dc299cc7649bc51e
Reviewed-on: https://skia-review.googlesource.com/10561
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-29 21:22:11 +00:00
bungeman
3e306f6bf4 Use FontWeight symbols when available on Mac.
Newer versions of macOS have NSFontWeightXXX symbols and iOS has
UIFontWeightXXX symbols to provide the conversion between [-1, 1]
CTFontDescriptor weights and [0, 1000] CSS weights. Currently the
values these symbols provide are hard coded (for expediency), but the
symbols should be used when available since the values may change
without notice.

Change-Id: I0875c6a96c5b14e456f91bccf7a84f0306a3d63a
Reviewed-on: https://skia-review.googlesource.com/10163
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-03-29 18:16:22 +00:00
Kevin Lubick
4a24e10a0b Add skia_use_egl flag
This allows us to specify it for Linux Arm devices (like chromebooks, and
possibly RPIs)
Bug: skia:6442

Change-Id: I043bc3b3686caf28fedfe1a6ab1dfd300cc4f066
Reviewed-on: https://skia-review.googlesource.com/10469
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2017-03-29 15:56:45 +00:00
Mike Klein
d63442d87c ok: add basic unit test support
Plenty TODO remaining.

This can actually kind of run without a test reporter or GrContext:
    $ out/ok test
    784 ok, 56 crashed
    ... lots of stack traces ...
Most tests don't use the reporter unless they're going to fail.

Change-Id: I7333e2c63ade5e671ebf60022d19390f1fc1c93a
Reviewed-on: https://skia-review.googlesource.com/10201
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-27 19:33:31 +00:00
csmartdalton
8c67909e04 Add a simple tool for isolating a path from an SKP
BUG=skia:

Change-Id: I5ca9bbd43919e3f65ea940847c68f85cc78dfeda
Reviewed-on: https://skia-review.googlesource.com/10130
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-03-27 19:19:19 +00:00
Mike Klein
f5d1a5567e ok: basic Vias
Not sure if these simple Src/Dst interfaces will last.
Vias are a little tricky, and some may be impossible.

Change-Id: I42d19b1ee74b51a830bb781f25a888c0b32ba98c
Reviewed-on: https://skia-review.googlesource.com/10174
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-25 17:32:20 +00:00
Mike Klein
7ac04838c5 Spin off non-core parts of ok into their own files.
Now ok.cpp handles only the high level coordination of Srcs and Dsts,
without having to know or care what they are.

Some minor refactoring to things like Options.

Change-Id: I02df890b26d6d069e980a125b6a1ce1a7067b900
Reviewed-on: https://skia-review.googlesource.com/10173
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-25 16:13:20 +00:00
Mike Klein
06432b26c6 ok
Change-Id: I9d01656a9d9b7aa3ab352dd4c168b26da620a903
Reviewed-on: https://skia-review.googlesource.com/9978
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-23 18:04:36 +00:00
Matt Sarett
189491c281 Enable dng testing on windows
IIRC, we had problems with OOM testing dng on windows.  Since then,
I think we have replaced our dng test images with smaller versions.
I think we can gives this another shot.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug

BUG=skia:

Change-Id: I05a20c2c0bcfdc2f5eb0bde20e3f4fc92f614d9d
Reviewed-on: https://skia-review.googlesource.com/9913
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-21 17:28:21 +00:00
Brian Salomon
3b5bf35720 Add $VULKAN_SDK/$Lib to lib_dirs on windows
Change-Id: Ibdef291103ae6de081ee01789357d4ea7a6fe5ed
Reviewed-on: https://skia-review.googlesource.com/9907
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-20 20:28:17 +00:00
Ethan Nicholas
a6ae1f7cda wired up SPIR-V validator
Change-Id: I33dfd5e7ea3ea048b88c6db2f14389b16a0af7c8
Reviewed-on: https://skia-review.googlesource.com/9688
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-16 14:42:20 +00:00
Hal Canary
44801cac9a FuzzCanvas: NativeGLCanvas
Change-Id: I7e032d19a5d464e0c46e76acac399786dd79b735
Reviewed-on: https://skia-review.googlesource.com/9721
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-03-15 18:50:38 +00:00
Mike Klein
2fcd17087e Revert "Turn on SkJumper all the time."
This reverts commit 135555101c.

Reason for revert: forgot g3, seems to break Chrome NaCl builders?

https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/15969/steps/compile/logs/stdio

Original change's description:
> Turn on SkJumper all the time.
> 
> If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
> I was mostly holding back because of build system complexity.
> 
> This has the main effect of turning on SkJumper in Chromium.
> It's already been on on our local test bots and on Android framework.
> 
> Change-Id: I7fbfc6aaaa7dace9c3f2cb509583c69b10997dbf
> Reviewed-on: https://skia-review.googlesource.com/9380
> 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: I69747e9e75b2a8e3d78f6c150c9b6d6453e00632
Reviewed-on: https://skia-review.googlesource.com/9444
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-08 18:54:42 +00:00
Mike Klein
135555101c Turn on SkJumper all the time.
If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
I was mostly holding back because of build system complexity.

This has the main effect of turning on SkJumper in Chromium.
It's already been on on our local test bots and on Android framework.

Change-Id: I7fbfc6aaaa7dace9c3f2cb509583c69b10997dbf
Reviewed-on: https://skia-review.googlesource.com/9380
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-08 14:18:57 +00:00
Mike Klein
894d5611e5 Back to code as data arrays, this time in .text.
This technique lets us generate a single source file, use the C++
preprocessor, and avoid the pain of working with assemblers.

By using the section attribute or declspec allocate, we can put these
data arrays into the .text section, making them ordinary code.

This is like the previous solution, except it should actually run.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug,Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: Ide7675f6cf32eb4831ff02906acbdc3faaeaa684
Reviewed-on: https://skia-review.googlesource.com/9336
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-07 14:55:32 +00:00
Mike Klein
e632003ca7 Support Android NDK r14.
simpleperf has moved a little since r13.  To support both, remove its
copy step.

Explicitly disable the Clang integrated assembler on MIPS.  It has only
understood the 'usw' (unaligned store) pseudoinstruction for about 4
months, and that won't be part of a Clang release until the upcoming
Clang 4.0.  Must be that -no-integrated-as was the default in r13.

All six platforms build on my laptop with r14 now.
Will follow up with the CL that moves the bots to r14.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-Android,Build-Ubuntu-Clang-arm-Debug-Android,Build-Ubuntu-Clang-arm64-Debug-Android,Build-Ubuntu-Clang-mips64el-Debug-Android,Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-x64-Debug-Android,Build-Ubuntu-Clang-x86-Debug-Android,Build-Win-Clang-arm64-Release-Android

Change-Id: Ic00981d534613ebab8f6e7646b967493728b91d9
Reviewed-on: https://skia-review.googlesource.com/9237
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-03-06 14:55:38 +00:00
Mike Klein
3669a824ba Put is_skia_standalone back a bit.
We do still need to know when we're in our GN environment or in another,
like Fuchsia's or Flutter's.

The places where we replaced is_skia_standalone with defined(ndk) still
look right to me as defined(ndk).

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-GCC-x86_64-Release-Flutter_Android

Change-Id: I5455014a8f4a350ac3a939097d042fd8cb4c32fa
Reviewed-on: https://skia-review.googlesource.com/9193
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-03-03 16:13:22 +00:00
Mike Klein
e459afd6ce Strengthen is_official_build, update docs.
This makes is_official_build turn off all development targets and
features in Skia, including building third-party dependencies from
source.

This will intentionally break some external users, who will find
themselves no longer able to find third-party headers or link against
third-party libraries.  These users have been building with our testing
third-party dependencies unknowingly.  They'll need to either explicitly
turn back on building each dependency from source
(skia_use_system_foo=false) or disable that dependency entirely
(skia_use_foo=false).

is_skia_standalone is now basically !is_official_build, so I've
propagated that through, removing is_skia_standalone.  In a few places
we were using it as a stand-in for defined(ndk), so I've just written
defined(ndk) there.  Duh.

gn_to_bp:

    is_offical_build's new strength also makes gn_to_bp.py simpler to
    write.  In spirit, Android builds are official Skia builds that also
    build DM and nanobench.

    It seems that SkJumper (src/jumper/*) is (unintentionally) enabled
    on Android.  Switching to an is_official_build would have disabled
    that.  But as that accidental launch seems to have gone fine, I've
    kept it explicitly enabled.

    In the end, no changes to Android.bp or its SkUserConfig.h.

The -Mini builder no longer needs to explicitly disable tools.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini

Change-Id: Id06e53268a5caf55c6046ada354a0863c3031c73
Reviewed-on: https://skia-review.googlesource.com/9190
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-03-03 15:41:24 +00:00
Hal Canary
24ac42b373 Fuzz PDF, N32, and Null Canvases
run `fuzz --type pdf_canvas` or `fuzz --type null_canvas` or
`fuzz --type n32_canvas`

Change-Id: Id70179d5578ed1e67006aef7823bf75fc1d7a4a6
Reviewed-on: https://skia-review.googlesource.com/8418
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-02-27 19:03:12 +00:00
Ben Wagner
fc497343cb Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: Id7cae439e795b8c9586394f11359fb7fe55e1c0b
Reviewed-on: https://skia-review.googlesource.com/8861
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-24 16:59:05 +00:00
Ben Wagner
97043299cb Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 0f3d0c37db.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> 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>
> 

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

Change-Id: I484fe52c1f89e7b6d0024dcabf7c59d0e8b5b5e7
Reviewed-on: https://skia-review.googlesource.com/8929
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-23 20:48:53 +00:00
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