Commit Graph

4437 Commits

Author SHA1 Message Date
Mike Reed
2c38315710 hide/remove obsolete/tricky SkMatrix methods
Change-Id: Iee399b929e8ca1a7326a326a643539d05e333d81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260818
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-12-18 22:29:52 +00:00
Brian Osman
d927bd246d Runtime SkSL: Reflect inputs in SkRuntimeEffect
Adds a new structure to describe the inputs, including type,
shape, name, etc. This removes any references to the type
variables in the compiler's context, and centralizes the
logic for parsing those type variables.

Also normalizes the rules for what types are supported.
(This was inconsistent among the various functions before).

Now:
  - bool and int must be 'in'
  - float may be 'in' or 'uniform'
  - float[2-4] and matrices must be 'uniform'

Includes a new Slide that allows for interactive editing
of a runtime shader.

Change-Id: Ic2af68a80c8bb645ba96417c430da24de0a9c2d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260497
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-18 17:37:55 +00:00
Brian Salomon
4dea72a987 Reland x3 "Remove most of GrConfig.h"
This change makes this safe for Chrome:
https://skia-review.googlesource.com/c/skia/+/260779

This reverts commit 3f1a98b779.

Change-Id: Ic6886ceabbf626040fc527ea10fe06cbe74a3854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260783
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-18 17:14:45 +00:00
Ravi Mistry
6f217e0f8d Make OUTPUT_DIRECTORY in ProdDoxyfile configurable
Bug: skia:9514
Change-Id: I628c2a59302e22c8d4c0973def0a3a11f7f882b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260817
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-12-18 16:46:25 +00:00
Chris Dalton
1215cda5a2 Add a kWireframe flag to GrPipeline
Adds the flag to GrPipeline, as well as a 'w' keystroke in viewer for
toggling the alternate global wireframe mode.

Change-Id: I385c31320a5fa2cec79b527a91fa876b19cdff89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260747
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-18 15:55:54 +00:00
Greg Daniel
3f1a98b779 Reland "Revert "Remove most of GrConfig.h""
This reverts commit 5b9c7ba313.

Reason for revert: Looks to still be breaking chrome

Original change's description:
> Revert "Revert "Remove most of GrConfig.h""
> 
> This reverts commit b0047b57b7.
> 
> Change-Id: I0c6df9e9d5c3984987398d2b7f675005828ab3de
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260697
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: Ia9860b39c562368f8a2f84283c52f55593333075
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260642
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-12-17 23:16:58 +00:00
Brian Salomon
5b9c7ba313 Revert "Revert "Remove most of GrConfig.h""
This reverts commit b0047b57b7.

Change-Id: I0c6df9e9d5c3984987398d2b7f675005828ab3de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260697
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-17 21:23:48 +00:00
Hal Canary
719a8119ae skottie_ios_app: fix tap logic
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal
Cq-Include-Trybots: skia/skia.primary:Build-Mac-Clang-arm64-Debug-iOS
Change-Id: Iddfe7f3c32c00cbd84064835c2dd3a31126c2ece
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260498
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-17 16:09:42 +00:00
Robert Phillips
6bad705d9b Additional DDL fix
The DDL bots are hitting a new assert on the tabl_worldjournal.skp after:

https://skia-review.googlesource.com/c/skia/+/260276 (Fix DDL bots)

Change-Id: I69e2c0f05ec48c31d9f6f48de23f1587088751a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260398
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-12-17 14:26:12 +00:00
Greg Daniel
d78a9b45b9 Fixes to skpbench to actually clean itself up nicely.
Bug: skia:9724
Change-Id: Ib6745042e7fbf529fda9d903b3eb1044f4eb4ee0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260399
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-12-16 21:09:10 +00:00
Chris Dalton
77912983a3 Include line numbers in Viewer's shader error windows
Change-Id: I83bea6e9c94431afba858b0e7b60456e8f9a2176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260356
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-12-16 19:08:11 +00:00
Hal Canary
efb4ed86cf SkMetalDeviceToGrContext: no longer needs any Skia headers
Also: mv experimental/skottie_ios tools/skottie_ios_app

Motivation:  make using SkMetalViewBridge that much easier for clients.

Change-Id: I985930ae0751d218e89c48c57b69d85ad7a1e703
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259279
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-16 18:09:40 +00:00
Robert Phillips
e84bffc746 Fix DDL bots
This fixes the proximal issue w/ the new DDL images. The underlying issue appears to be that the GIF decoder isn't available on all platforms.

Change-Id: I117b6460e09b2c7815d84929a340579690c15945
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260276
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-12-16 17:13:00 +00:00
Mike Reed
cf0e3c63fd remove dead code around old SkPath enums
Change-Id: I8dc06da48e881d3a9c40b47c799afe27bdcce819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257689
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-14 01:58:10 +00:00
Nathaniel Nifong
a072b7b275 Remove an uncessary and unused parameter for partially generating the JSON command list
All caller were passing the maxium value, those that weren't still function if they are made to.

Change-Id: Id9b5d8dbbbdf10a02ea0f3b21d500059ec383e3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259808
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-12-13 19:30:03 +00:00
Mike Klein
f46d5ca492 use std::make_unique
Change-Id: I7c672ff6b8eb95ec8c1123a5bfdb202e1644f494
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259281
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-12-12 22:32:45 +00:00
Nathaniel Nifong
20b177a9bf Parse android layer annotations in debugger, play back layers
Bug: skia:9626
Change-Id: I3ae8fa83520690f9af534e9ab0b70834d7890fb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256100
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-12 16:32:44 +00:00
Nathaniel Nifong
c84ad83df8 Fix audit trail visualization bugs
Change-Id: Ib488f11980da110a03ca832203db4bc35c456887
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259417
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-11 23:07:05 +00:00
Florin Malita
1bb3a6dae5 [skottie] Add SkottieSlide frame rate UI option
Also store fTimeBase as a double/ns, since uint/ms doesn't have enough
precision when setting progress manually.

Change-Id: Ic01a55cea5897dd8b43d2d54f4a98e08e7406af8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259172
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-11 22:40:42 +00:00
Florin Malita
15ee970d79 [skottie] Add frame time histogram to SkottieSlide UI
Ignoring GPU flush for now...

Change-Id: Ie28718ee528ac3f708c0237472845b3cca47f97d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259160
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-10 19:57:58 +00:00
Florin Malita
c4f6e024ca [skottie] Initial SkottieSlide UI
- reveal on hover over lower region
 - live progress bar

Planning to add more features.

Change-Id: I776d5b525070c8894ae2ca3a9d9d7c407399b9e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259158
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-10 19:08:34 +00:00
Nathaniel Nifong
732c49739f Return image address in image info so it can be shown in dropdown.
Note that I don't dereference this pointer, I'm just showing it to the user as it is currently
the only common identifier between the command list and the resource tab.

A longer term fix would be to show the resourse tab's indices in the command list. this is tougher
because it involves replacing UrlDataManager without breaking skiaserve.

Change-Id: Iaa0d60831e96128f19b6358e82b2e89f80444927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258800
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-12-10 14:40:43 +00:00
Florin Malita
870374825b [skottie] Explicit seek(0) in tools
With recent deferred image loading changes, Skottie relies on clients
to always/explicitly seek() before drawing a frame.

Some of the existing tools are still attempt to draw before the first
seek() fires (the animation callback is not guaranteed to occur before
the first draw).  For these, add an explicit seek(0) after loading the
animation, to ensure valid state.

TBR=
Change-Id: Ie453559af2d96560602b5e6508c25169dffb484d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258805
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-09 16:35:02 +00:00
Ben Wagner
5da8e55bf4 Protect against invalid text.
SkFont::countText returns -1 to let the user know that the text was not
valid in the encoding specified. Users need to check for this and act
appropriately. Otherwise in debug and assert will probably fire and in
release unexpected things may happen.

Change-Id: I6ce91aa3d978fe5265b659f759b4023b81da261f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258639
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-12-06 23:34:36 +00:00
Robert Phillips
3968fcbc3a Pull creation of GrPipeline explicitly into the Ops' onExecute methods
This is a first step towards pulling the creation of the GrProgramInfos explicitly into the Ops' onExecute methods. We need this behavior so programInfo creation can be moved forward to onPrePrepare.

For now, pipeline creation is a static member on GrSimpleMeshDrawOpHelper so GrPipeline creation can be bottle-neckedOps for Ops that don't use the helper. In some future world CreatePipeline could become non-static to reduce some of the duplicate code.

Bug: skia:9455
Change-Id: I2d35dd223db824e84616f5df0f1dca34c1b6e412
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258003
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-12-06 16:33:15 +00:00
Eric Boren
46e2d8d4a1 [infra] Use "mod download" and "install", not "get" in chrome_release_branch
Change-Id: I96bc057df6b538138827fac7129126381038656a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258240
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-12-06 11:16:41 +00:00
Brian Osman
ffbfd1bc78 Particles: Remove play-position thing, simplify mouse tracking
Change-Id: I36ce78ee1de8096d9aa164444e8af31b3831a3ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258217
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-05 20:07:13 +00:00
Brian Salomon
b0047b57b7 Revert "Remove most of GrConfig.h"
This reverts commit 80e334dad8.

Reason for revert: Chrome is including our private headers which means this breaks the Chrome roll:
https://chromium-review.googlesource.com/c/chromium/src/+/1953757

Original change's description:
> Remove most of GrConfig.h
> 
> Change-Id: I0f693bed0778151f93d07cd42c6b597566695ab1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257999
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie206db9865a7f9a7e334eb248de8cff38dd31d15
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258356
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-05 19:52:48 +00:00
Brian Salomon
80e334dad8 Remove most of GrConfig.h
Change-Id: I0f693bed0778151f93d07cd42c6b597566695ab1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257999
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-05 18:37:33 +00:00
Greg Daniel
f0e04f0c31 Always destroy resources instead of simply "abandoning" them in Vulkan backend.
This also now requires that when using a vulkan GrContext, the backing VkDevice,
Queue, and Instance must be alive when the GrContext is first destroyed or
abandoned. Additionally any GrBackendTextures created from the GrContext must
be deleted before destroying or abandoning the GrContext.

Bug: skia:9603
Change-Id: Ibf194d2ffdcddd61e34214d7d59a2d9a33c880e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257921
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-12-05 14:45:45 +00:00
Brian Salomon
4e1066f248 Remove SkSize& SkSize::operator=(const SkISize&)
Having it means you cannot write:

SkSize size;
float x, y;
size = {x , y};

clang allows it but GCC does not, claiming it is ambiguous between the
implicitly generated
SkSize& SkSize::operator=(const SkSize&)
  and
SkSize& SkSize::operator=(const SkISize&)

clang gives the same error if the former is explicitly declared default.

Change-Id: I3b64436ef6aa669b3d87e7f37057c5dcb4add987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257880
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-04 17:36:06 +00:00
Hal Canary
a06f9d0787 SkQP: model-creation improvements
- cut_release/find_commit: use cookies, handle errors.

  - tools/skqp/make_skqp_model.cpp: better error handling

Change-Id: I702e9a13d3a2123c30e3a870fcb942759cfc47c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257682
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-04 17:08:36 +00:00
Stephen White
a521c962b1 Update dawn.h -> webgpu.h, dawn_cpp.h -> webgpu_cpp.h.
Also fix some compile breakages from recent Skia changes.
No changes to Skia API.

Change-Id: Ifd0b1d89fb4ea3cf1f6a7170f2f74614276364ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257877
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-12-04 15:24:16 +00:00
Eric Boren
7e9dc42228 [infra] Auto-submit the CL to update supported branch configs
Change-Id: Ib4baeec7dc7247b81c7e4a1ef7f85ef378e4be19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257621
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-12-04 12:44:46 +00:00
Kevin Lubick
6bbeaa7c64 [skottieWASM] make sure we are using CPU or GPU correctly
Change-Id: Ib9013fa9bedbbbf8a7787ef2a75d707dd6360cf8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257635
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2019-12-03 18:29:53 +00:00
Brian Osman
9dac0d8216 Particles: Better integration for ResourceProvider
This untangles some of the dirty state tracking and dynamic rebuilding
support (that's only needed for the GUI editor), so the core code is
more streamlined. It also paves the way for feeding the RP to bindings.

Change-Id: I208ec59622154fdb2845c3ae8f7efb070d1abfc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257476
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-03 14:12:50 +00:00
Brian Osman
d12f2786e2 Use ResourceProvider in particles
Currently just for image drawable, but going to use this for
references to other kinds of data in bindings, too.

Change-Id: Ic6673530013337bbaadd2d3f1c040626ec24ffb8
Bug: skia:9513
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256776
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-27 16:45:23 +00:00
Brian Salomon
c241b58965 Make fragment processor iterators work with range for loops.
When iterating over the coord transforms or texture samplers of a
FP also have access to the owning FP.

Pass a coord transform range to GPs rather than a pointer to an
iterator.

Change-Id: If7c829a67dce6600d7f49e12d6f49f685dcace3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256216
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-11-27 14:32:43 +00:00
Robert Phillips
933484f6bb Stop using GrPixelConfig in Metal & Dawn's GrProgramDesc creation
In order to be able to create GrProgramDescs pre-flush we would like as little reliance on the GrRenderTarget as possible (also GrPixelConfig is going away).

Bug: skia:9455
Change-Id: Ie35c87758bb1ed97c99c6e9e130eaeb3355f4139
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256457
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-26 17:51:34 +00:00
Mike Reed
7d34dc7747 Revert "Revert "switch to new filltype for SkPath""
This reverts commit 3e7af41224.

Change-Id: Id4f66b3956f4bdbe690db20fc478b7365ee89717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-11-26 17:43:14 +00:00
Brian Osman
849f4d6571 Copy SkottieUtils' classes into skresources
For now, we'll have two copies. Once clients are using the skresources
versions exclusively, we can remove the originals from skottie.

Change-Id: I3152f526b0505b8374bdd9b4513a80bddc702ccc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256416
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-26 14:25:44 +00:00
Mike Reed
3e7af41224 Revert "switch to new filltype for SkPath"
This reverts commit 3a50981a83.

Reason for revert: chrome win build found compile-problem in xpsdevice

Original change's description:
> switch to new filltype for SkPath
> 
> Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: Iacb3566da61c2512b9bd6b7e42b592febc85e031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256530
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-26 03:34:30 +00:00
Mike Reed
3a50981a83 switch to new filltype for SkPath
Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-25 22:31:46 +00:00
Florin Malita
dd5ba942eb [skottie] Use seekFrame in skottie2movie
Produces more precise frame synchronization.

Change-Id: Ie9cd85cfbcab9eca827126feae48bb6836795983
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256217
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-11-25 13:35:45 +00:00
Brian Salomon
e21af50dc6 Test texture domain effect with local matrix.
Add a common way to make rect op for testing that uses a GP with a local
matrix.

Change-Id: I958d1230bd5067b2e4b60fcd374e2f7718681e43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255782
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-11-22 22:37:33 +00:00
Robert Phillips
34cea00bdf Add utility for creating test-only GrProgramInfos
This is complete overkill for what these GMs require but it will help centralize things.

Change-Id: If30cbd9a9cfc8fcc1fe96fc9ca1b4cb17cdeb4bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255824
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-22 19:01:14 +00:00
Mike Klein
fee0079e77 rough unit test support for FM
I've punted for now on GPU test support.

Change-Id: I2ebe54a6fc61e1ce92120a6a221d5bb936b047e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255874
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-22 15:49:33 +00:00
Hal Canary
389c8e9d2d [minor] mark scripts as executable
if a filename ends with `.py` and  the file begins with '#!.*python.*',
make it executable.

Change-Id: I41de516ff37343d3b0979bde9fd61813aec7365c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254439
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-11-21 17:06:27 +00:00
Hal Canary
2dad99092c Replace third_party/gif: Preflight changes
Something is breaking client code in unexpected ways.  Let's try this
piecemeal.

  - skia_libgifcodec_path gn var. Default is
    third_party/externals/libgifcodec.  Anfroid framework uses
    third_party/libgifcodec.

  - skia_use_libgifcodec gn var; defaults to !skia_use_wuffs.  Allow
    disabling both codecs.

  - GN template("optional"): add public_include_dirs, similar to
    public_defines.

  - SK_USE_LIBGIFCODEC, ifdef for skia_use_libgifcodec.

  - SkCodec.cpp: use SK_USE_LIBGIFCODEC

Original CL:  https://review.skia.org/254582

Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
Bug: skia:9654
Change-Id: I70561f5f945656065e4b318d5fff505961fb0b6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255578
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-21 15:19:41 +00:00
Hal Canary
f7cb902904 Revert "Replace third_party/gif with new DEPS entry."
This reverts commit 6d29bfbfcd.

Reason for revert: try to fix g3 roll.

Original change's description:
> Replace third_party/gif with new DEPS entry.
>
>   - skia_libgifcodec_path gn var. Default is
>     third_party/externals/libgifcodec.  Anfroid framework uses
>     third_party/libgifcodec.
>
>   - skia_use_libgifcodec gn var; defaults to !skia_use_wuffs.  Allow
>     disabling both codecs.
>
>   - BUILD.gn `gif` optional source_set: use new skia_libgifcodec_path
>     code, not third_party/gif code.
>
>   - GN template("optional"): add public_include_dirs, similar to
>     public_defines.
>
>   - SK_USE_LIBGIFCODEC, ifdef for skia_use_libgifcodec.
>
>   - SkCodec.cpp: use third_party version of SkGifCodec.h.
>
>   - src/codec/SkGifCodec.*, third_party/gif/*: remove files.
>
> Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
> Bug: skia:9654
> Change-Id: Ie22d2bb7e52322fd3eedb97015f3aec2ce5e3402
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254582
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=djsollen@google.com,halcanary@google.com,rmistry@google.com,scroggo@google.com

Change-Id: I427e1a073c0574e1502b6196873ac3001a22250b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9654
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255534
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-11-20 20:54:44 +00:00
Hal Canary
6d29bfbfcd Replace third_party/gif with new DEPS entry.
- skia_libgifcodec_path gn var. Default is
    third_party/externals/libgifcodec.  Anfroid framework uses
    third_party/libgifcodec.

  - skia_use_libgifcodec gn var; defaults to !skia_use_wuffs.  Allow
    disabling both codecs.

  - BUILD.gn `gif` optional source_set: use new skia_libgifcodec_path
    code, not third_party/gif code.

  - GN template("optional"): add public_include_dirs, similar to
    public_defines.

  - SK_USE_LIBGIFCODEC, ifdef for skia_use_libgifcodec.

  - SkCodec.cpp: use third_party version of SkGifCodec.h.

  - src/codec/SkGifCodec.*, third_party/gif/*: remove files.

Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
Bug: skia:9654
Change-Id: Ie22d2bb7e52322fd3eedb97015f3aec2ce5e3402
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254582
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-20 19:07:00 +00:00
Hal Canary
3e2ecd205f SkQP: remove unused script
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP
Change-Id: Ic61d4aad5b903d3fe48183606a22234a45bf9a9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255517
Reviewed-by: Hal Canary <halcanary@google.com>
2019-11-20 14:54:44 +00:00
John Rosasco
24cbdab97e SKQP Build for Fuchsia SDK
Change-Id: I2619784eca0f7a4dd66f2db0104cb746d9266b4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244369
Commit-Queue: John Rosasco <rosasco@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-18 12:34:28 +00:00
Jim Van Verth
7b55818248 Add flag to Viewer to trigger continuous redraw.
Change-Id: I71059001567b39afc486a2f099efdffde42b0d1b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254681
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-11-15 13:46:50 +00:00
John Rosasco
a9b348f66c Reland fully delineate GL usage w/ skia_use_gl.
Change-Id: I90f40467be145537cc08461fd3805606432f0cfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254240
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Rosasco <rosasco@google.com>
Auto-Submit: John Rosasco <rosasco@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-11-12 21:43:44 +00:00
Colin Cross
654eb2ad04 [SkQP/Android] Replace -Weverything with -Wextra
-Weverything is not recommended, use -Wextra.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Bug: b/143713277
Test: mma
Change-Id: Ibaca86bd52348d544a8109b25ae013001444935d
Reviewd-on: https://android-review.googlesource.com/1163299
Cherry-pick: 29cd4eca88df5fafde51ee9a50e3deb96263fc64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253956
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-12 16:49:29 +00:00
Mike Klein
4135cf0b57 use round() instead of trunc() to f32->unorm
This does open us up to a little bit of possible inconsistency of
rounding when right on a x.5 (sometimes we'll +0.5 and trunc, sometimes
round to nearest, sometimes round according to the default mode which is
usually round to nearest) but I think that inconsistency may be worth
the free register not needing a splat(0.5f) buys us.

A few invisible diffs.

Change-Id: I9af092c937ccf7c5891c2ab3cb298d217e4a9e9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253725
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-08 21:28:07 +00:00
Mike Klein
6e4aad91c3 rename to_i32 -> trunc, and add round
This plumbs through round but doesn't use it.  I want that change to be
its own CL.  It's nice to have assembler support and the name changes
even if I revert using round.

Change-Id: I6d67ec5c63546069eb7cc1c91599b599bafcda66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253724
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-08 21:00:51 +00:00
Robert Phillips
fcaae486d7 Use GrProgramInfo's primitiveType field
This improves the encapsulation of all the data required to make a program/pipeline w/in the GrProgramInfo class.

Bug: skia:9455
Change-Id: Ib41519c8ded9f27a7bbe787097a431b38ab101bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253376
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-07 16:15:04 +00:00
Robert Phillips
0efc01d540 Revert "Fully delineate GL usage w/ skia_use_gl"
This reverts commit 078cf3e3b2.

Reason for revert: Appears to be blocking the Chrome roll due to Fuchsia build failures

Original change's description:
> Fully delineate GL usage w/ skia_use_gl
> 
> Change-Id: I17424d2235c7a54c4cda036f01a0b99dadc4b632
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252085
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=mtklein@google.com,bsalomon@google.com,halcanary@google.com,rosasco@google.com

Change-Id: I17ba79bfe6e7f81c126eddbd50ca5384cfa4179c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253098
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-06 17:19:48 +00:00
Nathaniel Nifong
272060a18a find min and max, separared by comma. not minmax.
Change-Id: I04fbd9e1019a42fd7ee6d6ff8c8ec859d85c5aed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252932
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-11-06 16:35:23 +00:00
John Rosasco
078cf3e3b2 Fully delineate GL usage w/ skia_use_gl
Change-Id: I17424d2235c7a54c4cda036f01a0b99dadc4b632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252085
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-11-06 15:15:03 +00:00
Nathaniel Nifong
a2b2214047 Record min and max frame times from skpbench in perf
This should only add about 20kb per day to the data accumulated in perf.

Change-Id: Ia1ff49aa2987e3cfe435e35b5826cf1383746813
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252485
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-11-06 15:01:13 +00:00
Greg Daniel
e643da6ab8 Add new macro for checking device lost when making Vulkan calls.
This CL itself doesn't really change how anything is running today. However,
it is the first step into gracefully supporting a vulkan device lost return
error and being able to correctly clean everything up.

Bug: skia:9603
Change-Id: I9693c514a32ca437df61a7aee63651e2e40ee1c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252819
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-11-05 18:56:35 +00:00
Ben Wagner
057985ad67 Fail Skpbench on unsupported hardware
Stop running Skpbench on unsupported hardware.

Change-Id: Iafde07d493dcccdd41dffea09255da68cf44afdb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252044
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-11-05 18:21:19 +00:00
Brian Salomon
e9b546970e Add valgrind suppressions for GrClearImage
Similar to existing supprresions for bogus errors in GrConvertPixels.

Change-Id: I50f3b47ca3a88c71af532fa69aa2566ad0f03753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-11-05 15:46:13 +00:00
Jim Van Verth
923dad7a47 Fix memory leak in iOS viewer.
Forgot to add code to drain the Autorelease pool, so objects created
with autorelease just built up over time.

Bug: skia:8243
Change-Id: I373c6820df8ee102b110386377378858c235b2fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252601
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-11-04 20:35:21 +00:00
Hal Canary
5e5f9dc32b tools/git-sync-deps: enforce commit hash in DEPS, not tags or branches
Change variable name to reflect that.

Also, pass '--no-checkout' to git-clone to suppress "warning: remote
HEAD refers to nonexistent ref, unable to checkout" error message.

Also, change '@' to '>' in verbose output if anything changes in the
repositories.

Change-Id: I27d0b026d121c163e378f34ab2bbe81233ddba1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252177
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-01 17:22:40 +00:00
Mike Klein
ed2cec4b68 add --quick to fm
This is handy for cutting irrelevant tool costs from a CPU profile.

Change-Id: Ib1d5a64a01866333e4e83351571dcb7c282ee9dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252152
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-11-01 16:24:44 +00:00
Stephen White
3cc8d4fb7f Dawn: s/dawn::/wgpu::/g.
The new webgpu_cpp.h hotness for native apps brings with it a new
namespace: wgpu. This is a straight substitution.

Note: no Skia API changes.
Change-Id: I12b26417e76838cd8fa2b39b8161cbaa2cd8fa78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251660
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-30 14:29:46 +00:00
Florin Malita
f22dda9601 [skottie] Fix skottie2movie after async API change
TBR=
Change-Id: I4793d3540f3b5f5fa06ce7a3d1ce2a281660fb72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251255
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-28 23:28:25 +00:00
Hal Canary
a979b28cbb SkQP: mark several gms as unsuitable for skqp
This will make the Android 11 release go much smoother.

See: https://review.skia.org/228339 skia:7691 b/138466039 b/136618832

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Change-Id: I3fa48fa18ee20135e3c58e5c13a3cfffc0f88937
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248797
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2019-10-25 18:21:23 +00:00
Hal Canary
e107faa062 SkRemoteGlyphCache Add tracing to diff canvas
Use `extra_cflags=["-DSK_CAPTURE_DRAW_TEXT_BLOB"]` to enable.

Change-Id: I1d6db478ee91696cdce090647b889c17a83a2718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250259
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-10-24 17:09:31 +00:00
Brian Salomon
4eda7108a2 Simplify sk_gpu_test::MakeTextureProxyFromData.
Make it take GrImageInfo.

Change-Id: I9ec16e9b935fbe3e829b4669f715c17873a1793a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249813
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-21 20:04:37 +00:00
Florin Malita
cfbc4d496d [skottie] Add DataURI image support in utils/tools
BodyMovin can export inline (dataURI) images.

Change-Id: I821a2e225359f8ac37d4d2c9479d4ff5d78f924e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249516
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-10-21 18:02:39 +00:00
Hal Canary
051f7d66e1 Docs: include/docs with doxygen
Change-Id: Ic9e0040d12e92ba1fe91813ed1daaf83e28316d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249536
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-10-18 20:38:37 +00:00
Jim Van Verth
cbf59e0e39 Use LazyProxy to set up Metal swapchain.
The purpose of this is to delay acquiring the next drawable in the
swapchain to avoid stalling and gain better parallel execution between
the CPU and GPU.

Change-Id: I40ef7672394fd00616de43685530d2feaf7cab2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249005
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-18 14:04:41 +00:00
Stephen White
7b86d4e8a2 Dawn: allow CopySrc usage of swapchain texture.
This allows readbacks, which fixes backdrop_hintrect_clipping test.

Change-Id: I6b9002d7387b0bc79301848a2e7c70deb7b95f70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249418
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-10-18 13:56:31 +00:00
Hal Canary
c99a4df86e WebGL2: Add BlitFramebuffer, ShaderDerivativeSupport
fix from paraboul@

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit,Test-Debian9-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit

Bug: skia:9052
Change-Id: If0c408f33f4bb6cd47513a2c1f3a1e3ac3da3320
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249228
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-17 20:05:39 +00:00
Kevin Lubick
87fe9b0395 Tell rewrite_includes to ignore node_modules
Change-Id: Ibd82b52d15f9de7fbbd4a5a91d7be8310f6568d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249135
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-10-17 19:44:49 +00:00
Stephen White
883c7e9f59 Dawn: silence some warnings on win-clang.
Change-Id: Ifcab9738b5e1d17ed71e26fa30bb34951e421567
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249126
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-10-17 15:10:34 +00:00
Hal Canary
e054d3cf3d CanvasKit: Switch to WebGL 2.0
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit,Test-Debian9-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit

Bug: skia:9052
Change-Id: I444031276aea90d82f289b16ba6cd36de5192abd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248927
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-16 18:45:46 +00:00
Brian Osman
5b43113e75 Interpreter: Reflect all uniform variables in ByteCode
Gives enough information to locate variables by name (using the same
scheme as glGetUniformLocation), and provide hints about type and size.

Bug: skia:9513
Change-Id: I9444f1042471967a79c9f05167dcdb78eca41bad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244502
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-10-16 15:35:48 +00:00
Stephen White
1e2adcf428 Roll Dawn to ToT.
This requires some changes to dawnSetProcs() and some build file changes.

Change-Id: I8a643ec0690857d53db7c1f8f5223077e30f69e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248860
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-10-16 14:19:14 +00:00
Stephen White
20c626aa23 Update Dawn backend to ToT. This is about 3 months of changes.
Remove optional param to SetIndexBuffer().
Update SetVertexBuffers -> SetVertexBuffer.
PipelineStageDescriptor -> ProgrammableStageDescriptor.
Update past generator changes, ring buffer changes, etc.
Add ErrorScopeTracker.cpp/.h to the build.
Add Vulkan MemoryResourceAllocator files.
Fix vertexShader ShaderStageDescriptor.
Fix spirv-cross include path.
TextureUsageBit -> TextureUsage, etc.
DawnErrorCallback fixes.
Removal of texture.CreateDefaultView.
Fix GL supported_extesions mumbo jumbo.
Update past ChromeOS change.
Add PassResourceUsageTracker.cpp/.h to build.
Add GLFormat.cpp/.h to build.
Add Extensions and Toggles to the build.
Add EncodingContext, AttachmentState to build.
Add RenderEncoderBase to Dawn build.
gn format dawn BUILD.gn, spirv-cross BUILD.gn.

Change-Id: I26538d63c93668647048814aad6ad456ae323679
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248261
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-10-15 22:26:38 +00:00
Jim Van Verth
b7c5bac9da Remove some more MoltenVK support
Change-Id: I511f15f056e15beddeaaf203414a1519569bfbe4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248815
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-15 20:44:17 +00:00
Chris Dalton
b50cc81a3c Reland "Use GL_QCOM_TILED_RENDERING to explicitly discard stencil"
This is a reland of 7e6d3b00ad

Original change's description:
> Use GL_QCOM_TILED_RENDERING to explicitly discard stencil
> 
> Bug: skia:
> Change-Id: I7a6234f6a9955dbda83ab2d8fc6930fe680e102b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245529
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:
Change-Id: Ifb2ac1a595be0ca55d75d53d85bf76f7d98e1c15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246282
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-10-15 19:23:48 +00:00
Brian Osman
df18296f98 Add accessors to get/set SkParticleEffect fields
Simplify burst handling. Scripts should just add to burst (if
they want to handle programmatic bursting, as well).

Update most effects to handle dynamic updates to position better,
and add a sample effect meant to be used with mouse tracking.

Change-Id: Ia302e1d04e62e2b07974807c44067786cc10a8ad
Bug: skia:9513
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248798
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-10-15 14:54:50 +00:00
Hal Canary
aae3cc4378 docs/fiddle: add "incomplete" fiddle.
Change-Id: I66246d6c421cf91b459207d91e4899c4c030e45e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248159
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-10-11 18:22:34 +00:00
Florin Malita
10e5257ec9 [SkVideoEncoder] Allow clients to control the color type
Change-Id: If57514c9e7e8d0a417eb9388873bbb348fc49076
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247384
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-10 14:55:31 +00:00
Greg Daniel
a718a61003 Enable preferring using primary CB over secondary CB.
Bug: skia:9512
Change-Id: Ie099d37191ca62918b88ac12bb0b93e252e3aa79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243424
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-10-07 20:51:33 +00:00
Jim Van Verth
598903fe6d Guard some more Metal code to support older versions.
With these changes we can build across all versions of Metal, and for
the most part run on older OSes (further testing is necessary).

Bug: skia:9408
Change-Id: I00ee03b9a3a0e49483af4a610544b20d482a0cdd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245957
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-10-07 20:37:33 +00:00
Chris Dalton
38f0a4972a Add GL_QCOM_TILED_RENDERING as an optional interface
Change-Id: I29b53e674cd788ac188295060028bbb7805858a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246281
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-07 18:42:01 +00:00
Brian Osman
647c7a97d3 Particles: New confetti effect, minor tweaks elsewhere
Confetti mimics the look of a standard skottie asset

Change-Id: Iffeedeb24182c4ac2d3ec390614bc1861b821376
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246518
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-10-07 14:06:56 +00:00
Brian Salomon
9241a6d394 Reland "Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime""
This is a reland of 6fc04f88a8

Original change's description:
> Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
> 
> This is a reland of ce240cc6fd
> 
> Original change's description:
> > SkSurface asynchronous read APIs allow client to extend pixel lifetime
> > 
> > Previously the pixel data passed to the client was only valid during
> > the client's callback. This meant if the client wanted to defer
> > processing of the data a copy was necessary.
> > 
> > Now we pass an object to the callback and the pixel lifetime is tied
> > to the lifetime of that object.
> > 
> > The object may be holding a GPU transfer buffer mapped. We don't assume
> > that the object will be released on the direct GrContext thread. So
> > when the object is destroyed it posts a message to a new type,
> > GrClientMappedBufferManager, hanging off the direct context. The direct
> > context will periodically check for messages and unmap and then unref
> > buffers so that they can be reused. Currently this is done in
> > GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> > 
> > The old API is kept around for backwards compatibility but it is
> > reimplemented as a bridge on top of the new mechanism.
> > 
> > Also a utility function to SkImageInfo is added to directly make a new
> > info with a specified dimensions rather than passing the width and
> > height separately to makeWH().
> > 
> > Bug: chromium:973403
> > Bug: skia:8962
> > 
> > Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> Bug: chromium:973403, skia:8962
> Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: chromium:973403, skia:8962
Change-Id: Ie584c1c3ef8021c976f71b708e53871c693cc450
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246057
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-03 19:14:22 +00:00
Kevin Lubick
6d0d5a7f60 [canvaskit] Speculative fix for external wasm library
See https://groups.google.com/forum/#!topic/skia-discuss/J2XT7XjmFtI

Change-Id: I4daabc160e9f5b09d4233bcaf24661c8473c0d07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246080
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-10-03 19:01:27 +00:00
Ravi Mistry
cb55010652 Revert "Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime""
This reverts commit 6fc04f88a8.

Reason for revert: Chrome roll failure suspect because of:
* https://chromium-review.googlesource.com/c/chromium/src/+/1837131 (22 commits)
* https://chromium-review.googlesource.com/c/chromium/src/+/1837214 (24 commits)

Original change's description:
> Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
>
> This is a reland of ce240cc6fd
>
> Original change's description:
> > SkSurface asynchronous read APIs allow client to extend pixel lifetime
> >
> > Previously the pixel data passed to the client was only valid during
> > the client's callback. This meant if the client wanted to defer
> > processing of the data a copy was necessary.
> >
> > Now we pass an object to the callback and the pixel lifetime is tied
> > to the lifetime of that object.
> >
> > The object may be holding a GPU transfer buffer mapped. We don't assume
> > that the object will be released on the direct GrContext thread. So
> > when the object is destroyed it posts a message to a new type,
> > GrClientMappedBufferManager, hanging off the direct context. The direct
> > context will periodically check for messages and unmap and then unref
> > buffers so that they can be reused. Currently this is done in
> > GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> >
> > The old API is kept around for backwards compatibility but it is
> > reimplemented as a bridge on top of the new mechanism.
> >
> > Also a utility function to SkImageInfo is added to directly make a new
> > info with a specified dimensions rather than passing the width and
> > height separately to makeWH().
> >
> > Bug: chromium:973403
> > Bug: skia:8962
> >
> > Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> Bug: chromium:973403, skia:8962
> Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I9e01d1b82fb399b94292441d91da51176bb161d9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:973403, skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245956
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-10-03 09:19:24 +00:00
Brian Salomon
6fc04f88a8 Reland "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
This is a reland of ce240cc6fd

Original change's description:
> SkSurface asynchronous read APIs allow client to extend pixel lifetime
> 
> Previously the pixel data passed to the client was only valid during
> the client's callback. This meant if the client wanted to defer
> processing of the data a copy was necessary.
> 
> Now we pass an object to the callback and the pixel lifetime is tied
> to the lifetime of that object.
> 
> The object may be holding a GPU transfer buffer mapped. We don't assume
> that the object will be released on the direct GrContext thread. So
> when the object is destroyed it posts a message to a new type,
> GrClientMappedBufferManager, hanging off the direct context. The direct
> context will periodically check for messages and unmap and then unref
> buffers so that they can be reused. Currently this is done in
> GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> 
> The old API is kept around for backwards compatibility but it is
> reimplemented as a bridge on top of the new mechanism.
> 
> Also a utility function to SkImageInfo is added to directly make a new
> info with a specified dimensions rather than passing the width and
> height separately to makeWH().
> 
> Bug: chromium:973403
> Bug: skia:8962
> 
> Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: chromium:973403, skia:8962
Change-Id: I5cecd36276c8b6dc942cf549c7095db2df88530c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245678
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-03 01:41:35 +00:00
Brian Salomon
768f900a88 Revert "Use GL_QCOM_TILED_RENDERING to explicitly discard stencil"
This reverts commit 7e6d3b00ad.

Reason for revert: Breaks chrome, need to stage new GL function requirment. Example failure:

https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8900671758208001488/+/steps/vr_pixeltests_on_Android_device_Nexus_5__with_patch_/0/stdout


Original change's description:
> Use GL_QCOM_TILED_RENDERING to explicitly discard stencil
> 
> Bug: skia:
> Change-Id: I7a6234f6a9955dbda83ab2d8fc6930fe680e102b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245529
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I3f059d4232ef664cf2eb2c5122e55c2c291e45b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245876
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-03 01:32:28 +00:00
Brian Salomon
9c219785a8 Revert "SkSurface asynchronous read APIs allow client to extend pixel lifetime"
This reverts commit ce240cc6fd.

Reason for revert: crashing in chrome unit test, abandoned context related?

Original change's description:
> SkSurface asynchronous read APIs allow client to extend pixel lifetime
> 
> Previously the pixel data passed to the client was only valid during
> the client's callback. This meant if the client wanted to defer
> processing of the data a copy was necessary.
> 
> Now we pass an object to the callback and the pixel lifetime is tied
> to the lifetime of that object.
> 
> The object may be holding a GPU transfer buffer mapped. We don't assume
> that the object will be released on the direct GrContext thread. So
> when the object is destroyed it posts a message to a new type,
> GrClientMappedBufferManager, hanging off the direct context. The direct
> context will periodically check for messages and unmap and then unref
> buffers so that they can be reused. Currently this is done in
> GrContext::performDeferredCleanup() and GrDrawingManager::flush().
> 
> The old API is kept around for backwards compatibility but it is
> reimplemented as a bridge on top of the new mechanism.
> 
> Also a utility function to SkImageInfo is added to directly make a new
> info with a specified dimensions rather than passing the width and
> height separately to makeWH().
> 
> Bug: chromium:973403
> Bug: skia:8962
> 
> Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ic14cf07a7629b167c9f34a651aa87a0326e74207
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:973403, skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245721
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-02 22:51:15 +00:00
Brian Salomon
ce240cc6fd SkSurface asynchronous read APIs allow client to extend pixel lifetime
Previously the pixel data passed to the client was only valid during
the client's callback. This meant if the client wanted to defer
processing of the data a copy was necessary.

Now we pass an object to the callback and the pixel lifetime is tied
to the lifetime of that object.

The object may be holding a GPU transfer buffer mapped. We don't assume
that the object will be released on the direct GrContext thread. So
when the object is destroyed it posts a message to a new type,
GrClientMappedBufferManager, hanging off the direct context. The direct
context will periodically check for messages and unmap and then unref
buffers so that they can be reused. Currently this is done in
GrContext::performDeferredCleanup() and GrDrawingManager::flush().

The old API is kept around for backwards compatibility but it is
reimplemented as a bridge on top of the new mechanism.

Also a utility function to SkImageInfo is added to directly make a new
info with a specified dimensions rather than passing the width and
height separately to makeWH().

Bug: chromium:973403
Bug: skia:8962

Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-10-02 19:20:08 +00:00
Hal Canary
b5b45d7f08 SkQP: mark readpixels as a bad GM
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Bug: b/140327954
Change-Id: Idd27124aff3d104a423d8849e3af5da4f75a5a04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245622
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-10-02 18:59:07 +00:00
Chris Dalton
7e6d3b00ad Use GL_QCOM_TILED_RENDERING to explicitly discard stencil
Bug: skia:
Change-Id: I7a6234f6a9955dbda83ab2d8fc6930fe680e102b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245529
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-10-02 16:36:08 +00:00
Brian Salomon
4bc0c1fc4b Rename GrColorSpaceInfo -> GrColorInfo
Add version SkImageInfo::Make() that takes SkISize instead of separate
width and height.

Change-Id: I42aa79d23b19e22f5405631728c245b04bce0559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245172
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-30 21:53:24 +00:00
Robert Phillips
66944404ce Make SkPixmap-variant of createBackendTexture public
Change-Id: I51d916d2410428113e29d2fc374e5f1f7f4010b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244676
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-30 18:06:14 +00:00
Brian Salomon
f2ebdd91bf Rename GrPixelInfo to GrImageInfo.
Give it its own header file.

Make it store SkISize rather than separate int w/h.

Change-Id: I732f2774c561decac743a950959a70cbc162b67b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245163
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-30 17:10:18 +00:00
Brian Osman
4524e84a74 When precompiling SkSL, avoid the need to re-link
Adds metadata to the SkSL blobs about attributes (and other resources)
so that we can do all necessary work during precompile.

Change-Id: I1846c6c96946d5a43a48112d062853717a6571a0
Bug: skia:9402
Bug: b/140174804
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243739
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-24 20:32:32 +00:00
Mike Reed
5f12eaa6c2 support gpu for skottie2movie
-g will try to render the frames using OpenGL

For the motion-blur test skottie on Mac Pro...

Before: 71.0 secs
After :  6.6 secs

Change-Id: I7e723d4ac0bb63b0e42381ed50bf2144dfc9c8a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243428
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-24 16:42:50 +00:00
Ethan Nicholas
942d69fa9d Revert "Fixed GLSL ES compilation error in GLTestAtlasTextRenderer"
This reverts commit 382ea73f15.

Reason for revert: breaking the non-Metal iOS bots

Original change's description:
> Fixed GLSL ES compilation error in GLTestAtlasTextRenderer
> 
> The test was issuing GL code without precision modifiers in a GLSL
> ES context. This wasn't being detected as a fatal error (which is
> a separate issue that should probably be addressed) but was
> resulting in errors being logged from dm on (at least)
> Test-iOS-Clang-iPhone6-GPU-PowerVRGX6450-arm64-Release-All-Metal.
> 
> Bug: skia:9266
> Change-Id: Ic9b22ed2c66e37ed670270c377364de3bdd15f41
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243042
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=jvanverth@google.com,bsalomon@google.com,ethannicholas@google.com

Change-Id: I02feb9a6523ca777cd0de243eed4d1d1263a337f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9266
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243162
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-20 21:04:49 +00:00
Ethan Nicholas
382ea73f15 Fixed GLSL ES compilation error in GLTestAtlasTextRenderer
The test was issuing GL code without precision modifiers in a GLSL
ES context. This wasn't being detected as a fatal error (which is
a separate issue that should probably be addressed) but was
resulting in errors being logged from dm on (at least)
Test-iOS-Clang-iPhone6-GPU-PowerVRGX6450-arm64-Release-All-Metal.

Bug: skia:9266
Change-Id: Ic9b22ed2c66e37ed670270c377364de3bdd15f41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243042
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-09-20 20:18:37 +00:00
Mike Reed
f755bc7f11 call Graphics Init() to get faster asm
Change-Id: I1d8c1714c63e2f3833726342845d44abfc49745c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243096
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-09-20 16:05:39 +00:00
Hal Canary
e5b65d212b pdf-comparison and image_diff_metric tools
Change-Id: I2ee96581d77c5ded9c9c2dc371a554ebda6b8d26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242819
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-09-19 21:18:28 +00:00
Robert Phillips
ea1b30b57b New proposed syntax for SkColorTypes
Everything except for SkImageInfo.h is mechanical

Change-Id: I2d775c79467fb15f6022e80d21b4a9151272fe2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242896
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 20:42:55 +00:00
Jim Van Verth
b2f55532bb Set up prototype interface for MakeFromCAMetalLayer
Change-Id: I87b0fc76ef48c1a21498e576853a6c3b4a6a98f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242563
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-19 17:37:00 +00:00
Mike Klein
6b4143e11f move skvm debug tools back to core
I happened to have this on when profiling skottie_tool and got curious
why I was seeing the interpreter run and not JIT code.  Mostly this
moves the code in bulk out of SkVMTest.cpp to SkVM.cpp so that code in
SkVM.cpp can call dump() on itself.

Also this CL has the skvm::Program hang onto the original value-based
builder program (in addition to its own interpreter program and JIT
program if we can).  This is entirely so that when JIT bails out I
can have it dump out both the builder and interpreter programs for
more debugging aid.

I'm still going to need more debug tools somewhere to figure out
what the program that needs 17 registers is, and what to do about
it.

Finally, remove skvmtool.  It's annoying to maintain its build
rules, and I don't use it much if ever anymore.

Change-Id: I995d15d04bda79ddfc4d68bda8aaa3b5b9261f08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242520
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-09-18 19:41:11 +00:00
Robert Phillips
17a3a0bda9 Last tranche of new SkColorTypes
This CL adds:
    kAlpha_F16_SkColorType
    kRG_F16_SkColorType
    kRGBA_16161616_SkColorType,

which should be it for a while.

Bug: skia:9121
Change-Id: I81b9d46a202a76e9b7d7ca86495d72dbdae32576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241357
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-18 18:23:29 +00:00
Brian Salomon
8391bac5c6 Add F16Norm mode to viewer
Change-Id: If7b84731bce9ba8f1034c974fc7852ee304b499d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242478
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-18 17:04:56 +00:00
Brian Salomon
a90382fcf6 Pass color types when creating texture with initial data.
One describes the color type use case for the texture and the other
the color type of the texel data, a la writePixels().

Bug: skia:6718

Change-Id: I3ca2ab9f76aaeca4b2861a171b1aaacaa0709d1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240679
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-17 13:38:23 +00:00
Mike Reed
2d241f5b9a update videoencoder, add scale option, remove motion-blur hack
Change-Id: Ib80852d20384688a161b0f63593debbd7cdb3b42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241760
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-09-16 19:38:35 +00:00
Brian Osman
d46cb9729b Particle effect scripting update
This change adds another layer of complexity and control to
the particle system. There are now two code chunks: the old
code that's run per-particle, and new code that's run for
the effect itself. This allows for effect lifetime to be set
by the script (eg, randomly), as well as the emission rate.
Rate can vary over time (see pulse.json), and particles can
be emitted in bursts by setting the effect's burst field
(see fireworks.json).

Additionally, the effect has its own frame of reference and
color, which becomes the default state for newly emitted
particles. This allows synchronizing state across particles
in various interesting ways (see color in fireworks.json).

Change-Id: Iec2f7a3427ce1d6411ed7ef5b3023cbef2e8a134
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240498
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-16 17:48:04 +00:00
Brian Osman
4af42fcca1 Fix precompiling shaders on GLES / Android
We need to specify attribute locations and (sometimes) frag shader
output locations. Desktop GL worked fine without this, but Flutter
ran into this problem, and a Pixel 2 reproduced the issue.

Note that both APIs (BindFragDataLocation and BindAttribLocation)
don't take effect until the next time the program is linked, so
we have to relink the program after applying those changes.

I was afraid that re-linking would eliminate the perf benefits of
pre-compiling the shaders, but (at least on Pixel 2) that's not
the case. I traced the life of a single program, and the initial
link (during precompile) was 4.4 ms. The re-link took 0.23 ms.

Change-Id: Iadb3b425a8cf9f6a52e015c2e37f875c0fd73d6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241758
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-16 17:13:23 +00:00
Mike Reed
4241f5e0a8 Revert "add guard to switch to SkPathTypes"
This reverts commit e1af44498b.

Reason for revert: breaking google3?

Original change's description:
> add guard to switch to SkPathTypes
> 
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,kjlubick@google.com,fmalita@chromium.org,reed@google.com

Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 19:13:44 +00:00
Mike Reed
e1af44498b add guard to switch to SkPathTypes
Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 01:26:38 +00:00
Mike Reed
430470d519 make rectcontour and nestedrects private
Change-Id: I37b81f3cd96acc310ce78244d427eeb9c7999061
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241078
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-09-13 00:17:49 +00:00
Robert Phillips
429f0d380c Add kRG_1616 and kAlpha_16 SkColorTypes
This also switches GrColorType::kR_16 to kAlpha_16 to more closely match raster.

Bug: skia:9121
Change-Id: I03c6e6c52c90aa4223478c5ea6c8b2ed8558f677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239930
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-12 12:20:09 +00:00
Nathaniel Nifong
f7cf794890 Assert there are some sources when running skpbench
Change-Id: I6009dfc7c6eabe04b3b6fdf68f38995d718b4fef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235278
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-09-11 20:20:33 +00:00
Brian Salomon
d2a8ae2b71 Reland "Separate texture creation from uploading in GrGpu subclasses."
This is a reland of a7398246cb

TBR:egdaniel@google.com

Original change's description:
> Separate texture creation from uploading in GrGpu subclasses.
>
> GrGpu base class still allows creation with initial data, but separated
> at subclass level into create and then write pixels.
>
> GrGpu handles determining which levels need clearing and GrGpu
> subclasses take a mask and clear levels with mask bit set.
>
> GrGLGpu uses three pronged clear strategy:
> glClearTexImage() if supported, glClear() if format is FBO bindable, and
> lastly glTexSubImage2D with zero'ed buffer.
>
> Change-Id: I65fb1e60eed8f9d0896d686d3baeb10b57ff8f39
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236676
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

Change-Id: I54cda3b6a4b017a94ef1f50bb3748c45a24d8936
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240558
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-10 21:27:13 +00:00
Brian Salomon
8e63cab2e8 Revert "Separate texture creation from uploading in GrGpu subclasses."
This reverts commit a7398246cb.

Reason for revert: breaking bots

Original change's description:
> Separate texture creation from uploading in GrGpu subclasses.
> 
> GrGpu base class still allows creation with initial data, but separated
> at subclass level into create and then write pixels.
> 
> GrGpu handles determining which levels need clearing and GrGpu
> subclasses take a mask and clear levels with mask bit set.
> 
> GrGLGpu uses three pronged clear strategy:
> glClearTexImage() if supported, glClear() if format is FBO bindable, and
> lastly glTexSubImage2D with zero'ed buffer.
> 
> Change-Id: I65fb1e60eed8f9d0896d686d3baeb10b57ff8f39
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236676
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Icc6860053242ff1a55784a0f38938968f9e5e5b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-10 19:02:47 +00:00
Brian Salomon
a7398246cb Separate texture creation from uploading in GrGpu subclasses.
GrGpu base class still allows creation with initial data, but separated
at subclass level into create and then write pixels.

GrGpu handles determining which levels need clearing and GrGpu
subclasses take a mask and clear levels with mask bit set.

GrGLGpu uses three pronged clear strategy:
glClearTexImage() if supported, glClear() if format is FBO bindable, and
lastly glTexSubImage2D with zero'ed buffer.

Change-Id: I65fb1e60eed8f9d0896d686d3baeb10b57ff8f39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236676
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-09-10 18:06:43 +00:00
Brian Salomon
b2d5d40a33 Adapt GrRectBlur for cases with rect W/H less than six sigma.
Add GM that generates reference blur rect images and compares against
actual.

Change-Id: If0ce291e211fefe96af8afdf0a60636b5f40ef47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239757
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-09-10 14:39:07 +00:00
Jim Van Verth
d0cf5da20d Hook up pinch-zoom and swipe gestures.
Sets UIPinchGestureRecognizer and UISwipeGestureRecognizers and
passes the result down to the sk_app::Window. To simplify detection,
swipes take precedence over pans, and pans require a single touch.
This is less flexible for the app, but in most cases I think is
what we want.

Bug: skia:8737
Change-Id: Ib031b6ad465d3a353da29d7e0b48a666d4ff8b9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239776
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-10 13:34:47 +00:00
Chris Blume
08b68dba6a Add blocklist command line parameter
The name "blocklist" is more inclusive than "blacklist" while
still conveying the intention clearly.
See https://developers.google.com/style/word-list#blacklist

In order to rename Chromium's --ignore-gpu-blacklist command line
parameter we must first add the new --ignore-gpu-blocklist
everywhere it is used. Once this is done, Chromium can rename its
command line parameter and then we can remove the old references.

This CL adds the --ignore-gpu-blocklist command line parameter.

Bug: 842296
Change-Id: Icb54aa74a899d5530bad0c679f4382f28e13ff40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239923
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Chris Blume <cblume@google.com>
2019-09-06 21:07:20 +00:00
Brian Osman
ed58e004e0 Add support for pre-compiling cached SkSL shaders
The client can do a test run of their application with
a persistent cache set to SkSL mode. They store the key
and data blobs that are produced.

Ship those blobs with the application. At startup, call
GrContext::precompileShader for each key/data pair. This
compiles the shaders, and stores the GL program ID, plus
a small amount of metadata in our runtime program cache.

Caveats:
* Currently only implemented for the GL backend. Other
  backends will require more metadata to do any useful
  amount of work. Metal may need a more drastic workflow
  change, involving offline compilation of the shaders.
* Currently only implemented for cached SkSL (not GLSL
  or program binaries). Supporting other formats again
  requires more metadata, and the cached shaders become
  increasingly specialized to GPU and driver versions.
* Reusing the cached SkSL on different hardware is not
  supported. Many driver workarounds are implemented in
  the SkSL -> GLSL transformation, but some are higher
  level. Limiting device variance by artificially hiding
  extensions may help, but there are no guarantees.

* The 'gltestprecompile' DM config exercises this code
  similarly to 'gltestpersistentcache', ensuring that
  results are visually identical when precompiling, and
  that no cache misses occur after precompiling.

Change-Id: Id314c5d5f5a58fe503a0505a613bd4a540cc3589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239438
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-06 19:45:09 +00:00
Robert Phillips
d470e1b905 Add kRG_88_SkColorType
Bug: skia:9121

Change-Id: Id2a12a5d607b84ce393d2b58233bf8e23f646059
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235797
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-06 17:55:26 +00:00
Jim Van Verth
dfda49e3b5 Add touch support to viewer
Bug: skia:8737
Change-Id: I81379bd57684626705da48e03c91b83e91031e0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239104
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-09-05 20:21:41 +00:00
Brian Osman
a66081d943 Move SkSL caching out of GR_TEST_UTILS, trim persistent cache options
Combines the two boolean options into a single tri-state enum. Old GLSL
option is still present (temporarily) until Chrome is switched over.

Also add a type tag for cached program binaries, so we can safely
detect cache entries of the wrong type.

Change-Id: I0ddeefa9180b27bc2c46e2e7b77e6c9cdf4a730a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-03 20:18:48 +00:00
Brian Salomon
beb7f525c8 Make GrSurfaceProxy constructors take arg that determines participation in
GrResourceAllocator.

Removes LazyInstantiationType. All callbacks can be invoked one time (if successful).
Lazy callbacks indicate whether their lifetime should be extended, which is used by
promise image proxy callbacks.

Promise image proxies are no longer deinstantiated at the end of flush and
GrDeinstantiateProxyTracker is removed. They will be instantiated the first time
they are encountered in GrResourceAllocator::addInterval (without actually adding
an interval) and then remain instantiated.

Also removes some "helper" versions of proxy factory functions that took fewer
params. They weren't much used outside of test code and as the total number of params
has grown their relative utility has diminished. We could consider a params struct
or radically simpler helpers that take only a few params if desired.

Change-Id: Ic6b09e7b807b66cb9fcbb7a67ae0f9faf345485f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238216
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-03 14:58:41 +00:00
Jim Van Verth
e58d532bc3 Get Metal running on iOS viewer.
Adds MetalWindowContext_ios and hooks it up to Window_ios.
Also includes some minor clean up in other iOS code.

Bug: skia:8737
Change-Id: I2e8a0c755310fbc4ed534f975815c60f8eca130b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238438
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-03 14:07:39 +00:00
Brian Osman
2aa85df8e7 Particle cleanup: split SkParticleBinding out of SkParticleEffect
Also simplify type registration.

Change-Id: Ia47febb2ae2cd5821476c3dd33a688b688aa6d6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238359
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-08-30 15:32:38 +00:00
Ravi Mistry
b30ba90aec Fix spreadsheets page set for RecreateSKPs bot
NoTry: true
Bug: skia:9380
Change-Id: Iab05b1baab58032a8053242fd2a8b6e8799c35cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238037
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-08-30 13:43:11 +00:00
Jim Van Verth
68cb8b0239 Switch to new IOS windowing system.
This replaces the SDL-based system and should allow Metal to work on iOS.
OpenGL and raster will render but there's no touch input yet.

Bug: skia:8737
Change-Id: I863accc47f0e1781192d567dbe54d1e321c3cd2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231561
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-08-29 20:13:03 +00:00
Hal Canary
b1f411ac05 tools/skui: put all enums in a common namespace
Change-Id: Icd331e8946d80652750b8b6ea0db65f5f676ac3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238058
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-29 15:39:32 +00:00
Ben Wagner
54aa8846e9 Add test for baseline snapping.
Change-Id: I895218ba087d2f04ee92bc6eaaaad780723a9202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237803
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-08-28 16:35:55 +00:00
Hal Canary
a67523ae67 SkQP: Use SK_GL macro
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Change-Id: I9978cb3c2a2dc726a46d0377f84fceb879b73917
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-28 15:34:15 +00:00
Michael Ludwig
a595f86428 Add Color4f variant for DrawEdgeAAQuad
Bug: chromium:795132,chromium:985500
Change-Id: Idbb4d45b29d2c0d0fd54b05b807086ecf0b8cf26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237492
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-27 23:22:32 +00:00
Ben Wagner
c17de1d2b7 Add a way to disable baseline snapping.
Skia has traditionally snapped horizontal and vertical baslines to
pixels as a kind of baseline hinting. This is a feature which cannot
reliably be implemented from the outside and tends to make static text
better looking by ensuring the baselines are consistent. However, with
animation like scrolling or flying and resizing text the animation
suffers. Allow the user to disable the baseline snapping.

Change-Id: I6ee1c12a07242d10c08ae4b75c73e4e28c860790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237124
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-08-27 19:54:29 +00:00
Mike Reed
3012cbaa20 remove unneeded noemptycheck variants of intersect
The existing intersect logic already fails if either argument is empty,
without performing any extra checks.

Change-Id: I4cc4f1e63af7efbed4e1084284c1607c104ff361
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237142
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-08-26 15:03:44 +00:00
Mike Reed
92b33354dd more rect api simplifications
set --> setLTRB
set(pts, count) --> setBounds

Bug: skia:9328
Change-Id: I807c0598a8b23b2f721db118ec41c1607114205a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237038
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-08-25 10:12:57 +00:00
Greg Daniel
9313874349 Rename GrContextOption fReduceOpListSplitting to fReduceOpsTaskSplitting.
Change-Id: Ieba56fa4c4926fc0a118d84950fa1eb78a48a29e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236576
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2019-08-23 18:43:27 +00:00
Greg Daniel
f41b2bd449 Reland "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit f21bf9e50b.

Reason for revert: relanding with infra fix

Original change's description:
> Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
>
> This reverts commit 2a5954140b.
>
> Reason for revert: breaking everything
>
> Original change's description:
> > Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> >
> > Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ibd3a06e4a91dbb1f225dcc8d17d0db3967b6f85f
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236350
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-22 20:52:09 +00:00
Greg Daniel
f21bf9e50b Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit 2a5954140b.

Reason for revert: breaking everything

Original change's description:
> Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> 
> Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-22 20:12:38 +00:00
Greg Daniel
2a5954140b Merge GrOpList and GrRTOpList and rename to GrOpsTask.
Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-22 19:33:01 +00:00
skia-autoroll
fe16a33005 Roll skia/third_party/skcms d931999c3afd..6655095842ec (1 commits)
Also whitelist third_party/skcms from #include rewrites.

https://skia.googlesource.com/skcms.git/+log/d931999c3afd..6655095842ec

git log d931999c3afd..6655095842ec --date=short --no-merges --format='%ad %ae %s'
2019-08-20 mtklein@google.com Add missing b-tweak to skcms_TF_Invert()

Created with:
  gclient setdep -r skia/third_party/skcms@6655095842ec

The AutoRoll server is located here: https://autoroll.skia.org/r/skcms-skia-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.

CQ_INCLUDE_TRYBOTS=luci.chromium.try:linux-blink-rel

Bug: chromium:976551
Change-Id: I6566968525070f0af808d04211b16e71f9850cea
TBR=egdaniel@google.com,mtklein@google.com
TBR=egdaniel@google.com,mtklein@google.com

Change-Id: I2c9b6a270693e9e93303b9cfef1262488bba1aae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235936
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-08-20 20:57:15 +00:00
Hal Canary
82e3afa99d SkQP: split make_apk script into create_apk and make_apk
gn_to_bp:  wrap defines in ifndef

create_apk.py assumes you are either run from the aosp tree, or you are
being run from make_universal_apk.py, which now defers to create_apk.py
for all functionality, even argument parsing.

tools/skqp/generate_gn_args moved some functionity into skqp_gn_args.py,
which is now used by create_apk.py

create_apk now accepts android sdk license for you.

create_apk and make_universal_apk.py now are better about cleaning up
after exceptions happen.

Old script make_apk.sh now just points at make_universal_apk.py

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Change-Id: I2dba20ef7017987cabb2bd49f070e2b1594785d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235678
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-20 15:08:03 +00:00
herb
7022b773ee Part 1/2 to remove SkTextBlobCacheDiffCanvas::Settings
fMaxTextureSize and were never used by Skia, and
f{Min|Max}DistanceFieldFontSize are never set by Chrome.

Make a new constructor that only takes a bool to indicate DFT
capability. Move Chrome to use that ctor.

Change-Id: I1889dd39ffdaa2134b0892b8275f8223c6c8aad0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235102
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-08-16 15:27:35 +00:00
Mike Klein
963a606677 roll cast toolchain
- clang 3.9 -> clang "9"  (pre-release)
  - libstdc++ -> libc++     (pretty sure)

PS1 should fail to build... need to update
infra/bots/recipe_modules/build/chromecast.py too.

PS2 compiles but fails to link.

PS3 puts -Lchromebook_arm_gles/lib on the link line;
unclear to me how we're linking today...

PS4 removed a workaround for the older toolchain.

PS5+ tries to request the older glibc math symbols
that shipped with the devices we test on... we don't
seem to have glibc 2.27 there.

Cq-Include-Trybots: skia.primary:Test-Chromecast-Clang-Chorizo-CPU-Cortex_A7-arm-Debug-All,Perf-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All,Test-Chromecast-Clang-Chorizo-GPU-Cortex_A7-arm-Release-All
Change-Id: I7a1ac2da646fb5b0cbdeb44310f1c0747013f3f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234956
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-08-15 20:02:18 +00:00
Brian Salomon
9c73e3df83 Turn off -Wreturn-std-move-in-c++11
Change-Id: I127c979670c3dc7dac2e35908a795afbdefca8f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234902
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-15 17:45:58 +00:00
Brian Osman
4c3fd34e00 Remove MakeCrossContextFromEncoded, unused argument from ...FromPixmap
Change-Id: I962e923a4994eb549a9c1002323f33d05b936b84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234912
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-15 17:10:28 +00:00
Ravi Mistry
3959dc29e2 [perf_skottiewasm_lottieweb] Increase loops to 5
NoTry: true
Bug: skia:9237
Change-Id: I6ca6434ac24c9172787b0bf545e5ce446cbfe756
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234899
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-08-15 16:21:29 +00:00
Brian Salomon
201cdbb646 Make GrSamplerState.h and GrRenderTarget.h private
Change-Id: Id7a270f5a528e1a4a6d94474fa092545252753b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234667
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-15 12:22:11 +00:00
Greg Daniel
7bfc9139c6 Remove GrCaps isConfigTexturable.
This also makes the isTexturable that takes a color explicitly called
isFormatTexturableAndUploadable. A lot of the uses of isConfigTexturable
were changed to the Uploadable version of the check, even though this is
not where we want to land in the long run. In the long run the uploadability
will be checked via calls to supportedWritePixelsColorType and all the
isTexturable calls should purely be about texturing. However, until those
changes land we keep it safe and keep the same functionality that
isConfigTexturable had by checking uploadability as well.

Bug: skia:6718
Change-Id: I3563f33f49811923da80e676fa3036ae46c4da70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234323
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-14 19:30:45 +00:00
Ben Wagner
406ff500a4 Clean up some gm factory use.
Mostly use unique_ptr more consistently.

Change-Id: I6e11b272a7904eb662dea59b03fbc309a4cfc25d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233984
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-13 15:57:37 +00:00
Hal Canary
edda5653e1 gm: GMFactory returns a unique_ptr<>
Change-Id: If8a4d3cfdeaef58dd9924af430cfed834519b096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232496
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-12 19:02:40 +00:00
Hal Canary
ca9e187dfa SkMetaData: drop unused pointer ownership
Change-Id: Iff3b14868480b8c5f0029df8516cfaea0d05ac8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230892
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-12 18:26:00 +00:00
Sergey Ulanov
2739fd2f09 Reland: Enable YCbCr sampler support on platforms other than Android
Previously YCbCr Vulkan samplers were supported only on Android for
external images, while Vulkan requires YCbCr sampler for I420 YUV image
formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
This CL:
 - Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
   VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
 - Updates GrVkYcbcrConversionInfo to add fFormat field and allow
   fExternalFormat=0.
 - Removes assertions format=VK_FORMAT_UNDEFINED for all images that
   have ycbcr info.

Bug: chromium:981022
Change-Id: Id4d81b20d9fda4d9ad0831f77e6025eed3db2bfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233776
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
2019-08-12 14:21:01 +00:00
Brian Salomon
74c19de3be Add SkUNREACHABLE to definition of SK_ABORT.
Remove return statements immediately following SK_ABORTs.

Change-Id: I6446b6ba3a6fb272d84ea27f38cf366095cf801d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233565
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-09 20:43:39 +00:00
Greg Daniel
9fc5e8da98 Revert "Enable YCbCr sampler support on platforms other than Android"
This reverts commit cc4573dfed.

Reason for revert: Seems to be crashing in Win Intel vulkan bots

Original change's description:
> Enable YCbCr sampler support on platforms other than Android
> 
> Previously YCbCr Vulkan samplers were supported only on Android for
> external images, while Vulkan requires YCbCr sampler for I420 YUV image
> formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
> VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
> This CL:
>  - Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
>    VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
>  - Updates GrVkYcbcrConversionInfo to add fFormat field and allow
>    fExternalFormat=0.
>  - Removes assertions format=VK_FORMAT_UNDEFINED for all images that
>    have ycbcr info.
> 
> Bug: chromium:981022
> Change-Id: I3989f72e918a257a081b81ae20429a6771229ad6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230918
> Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,sergeyu@chromium.org

Change-Id: Ia9c229fbec4cd397fb04304753fa49f34336ed3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:981022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233563
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-09 19:09:05 +00:00
Sergey Ulanov
cc4573dfed Enable YCbCr sampler support on platforms other than Android
Previously YCbCr Vulkan samplers were supported only on Android for
external images, while Vulkan requires YCbCr sampler for I420 YUV image
formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
This CL:
 - Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
   VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
 - Updates GrVkYcbcrConversionInfo to add fFormat field and allow
   fExternalFormat=0.
 - Removes assertions format=VK_FORMAT_UNDEFINED for all images that
   have ycbcr info.

Bug: chromium:981022
Change-Id: I3989f72e918a257a081b81ae20429a6771229ad6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230918
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-09 18:01:13 +00:00
Brian Salomon
ec22b1a2bf Expose GrContext::dump() when SK_ENABLE_DUMP_GPU is defined.
Change-Id: I499228454bc387de2c988b8f607320b7e5ea57b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233557
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-09 14:13:01 +00:00
Hal Canary
54602eaaa6 SkQP: Docker compile helper script respects SKQP_OUTPUT_DIR
No-Try: True
Change-Id: Iefbcbc031a0b012de7751413581e78c0ee30007f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233159
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-08 14:11:58 +00:00
Greg Daniel
6fa62e2ab3 Remove use of GrColorType on GrCaps::getRenderTargetSampleCount.
Additionally this changes removes the version of the call that that takes
a GrPixelConfig.

As part of this change many call sites that were calling getRTSampleCount
to just check renderability have been changed to call
isFormat[AsColorType]Renderable instead. This change has also started to
move us to just checking format renderability (without GrCT) in classes
that are specifically dealing with GrSurface (GrResourceProvider, GrGpu, etc.).

Bug: skia:6718
Change-Id: Icf4a1a21a81a44e6863a7cd2059d21b9833d581f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233039
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-08 13:15:28 +00:00
Hal Canary
bcfed55a8c experimental/editor: mouse drag select, modifierkeys cleanup.
Change-Id: I8c8de54ad6309424bdf18987ccf3eac6bdd41c19
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233080
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-08 02:33:44 +00:00
Hal Canary
cd30375f36 SkQP: make_apk_list.py include pie-cts-dev branch
No-Try: true
Change-Id: I3482f0e55eebe325eef1c140a16b867d89aa6580
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233081
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-07 19:42:38 +00:00
Hal Canary
d5611554c3 SkQP: modify make_universal_apk to work in AOSP branch
Change-Id: I2e7c6c3fce1561e3727a2a6d4a69e2b1bbd8c75c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232758
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-08-06 18:17:38 +00:00
Brian Salomon
4eb38b7684 Pass GrBackendFormat to GrResourceProvider and GrGpu texture create
functions.

Change-Id: Ie3fe9d56fdbf369ccacd0188a3d3d73ce1d30d48
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232141
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-05 17:33:17 +00:00
Hal Canary
ee2378a717 tools/gyp: deleting old file
Change-Id: If3690774b93fe5f3cd97222993cf2bc47563c22a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232021
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-05 17:11:08 +00:00
Michael Ludwig
2300318551 Update benchmarks to use new filter factories
Also refactors 3 duplicate functions that converted an SkTileMode to
a char*. This will rename the matrix convolution benchmarks that used
"clampToBlack" to the more modern "decal" terminology.

Bug: skia:9280
Change-Id: I43a4f9edeba36eb5af1243f7e4ab7647253b91f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230883
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-05 16:41:25 +00:00
Hal Canary
4df3d5340e rewrite_includes.py: make it work on windows
Also:
    Revert "don't try to format includes on windows"
    This reverts commit e68b5bd4e6.

Change-Id: I93dc4dba4808c07882e977ac0693c93e282bbad5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230878
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-05 16:14:35 +00:00
Stephen White
a800ec96f7 Dawn: implement sk_app window contexts for all backends.
Implement Window contexts for D3D12, Metal and Vulkan, as well as
a base class for all of them (DawnWindowContext).
Implement WSI, swap chains and external textures for all backends.
Add Dawn support to Viewer app.

Change-Id: I9368eae8d43594821aa1edd9fd559c8a9ba30066
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228060
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-08-02 19:51:02 +00:00
Chris Dalton
6b49810f98 Extract a GrRenderTask base class from GrOpList
This is a more abstract representation of something that can
participate in the DAG by modifying a GrSurfaceProxy's pixels. This
will serve as the direct base class for future DAG participants that
aren't opLists, and help to eventually remove GrTextureOpList.

Bug: skia:
Change-Id: Ia903c0188e0f6a6602781b90ee8da87ba3cc13f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231277
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-08-02 16:56:09 +00:00
Hal Canary
149f3f1978 tools/sk_app: fWindowContext is unique_ptr<>
Change-Id: I828f298e336da22756588d981481c76b890af2ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231648
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-02 16:16:34 +00:00
Hal Canary
3f4a2b3499 sk_app, editor: cursor blink
Change-Id: I43044727298265ddb711456346c2b544ca8d509d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231477
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-08-02 15:36:40 +00:00
Mike Klein
c588af9a69 bigger channel buffers in fm_bot
In really catastrophic cases like an fm binary hacked up to crash all
the time, we'll deadlock splitting failed batches up into individual
re-runs here

    // If a batch of sources ran and failed, split them up and try again.
    for _, source := range w.Sources {
        wg.Add(1)
        queue <- work{[]string{source}, w.Flags}
    }

Those <- writes will block once queue becomes full, which is really easy
to do here since we originally got close to filling the queue, and now
we're multiplying that by some K factor with all those failures.

There's probably a better way to do this than to make the queues have a
~1M element buffer, but it's kind of the easiest thing to do without
really restructuring how the code works.  If this proves fussy I'll
probably stop using channels and replace them with a mutex and a slice.

Change-Id: I95d61f9003c708ff5e149c6c030ef10adb14c6df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231679
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-01 23:01:07 +00:00
Mike Klein
140a4767f0 make presubmit failures clearer
A presubmit failure will now print something like

~/skia (reed↑2|…) $ git cl presubmit
Running presubmit commit checks ...
Some files need rewritten #includes:
	src/core/SkBitmapCache.cpp
	src/core/SkBitmapController.cpp
	tests/SkResourceCacheTest.cpp
To do this automatically, run
python tools/rewrite_includes.py src/core/SkBitmapCache.cpp src/core/SkBitmapController.cpp tests/SkResourceCacheTest.cpp

** Presubmit ERRORS **
`python tools/rewrite_includes.py --dry-run gn/core.gni src/core/SkBitmapCache.cpp src/core/SkBitmapCache.h src/core/SkBitmapController.cpp src/core/SkBitmapController.h src/core/SkBitmapProcState.cpp src/core/SkBitmapProcState.h src/shaders/SkBitmapProcShader.cpp src/shaders/SkBitmapProcShader.h src/shaders/SkImageShader.cpp tests/SkResourceCacheTest.cpp tools/rewrite_includes.py` failed

Change-Id: I84018a6e102efa8b477a2523f6b0fc927a674e1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-01 20:49:11 +00:00
Brian Salomon
8f8354a9a3 Reland "Remove GrCaps::SupportedRead::fSwizzle and supporting code"
This reverts commit a0f864d6ac.

Reason for revert: updated valgrind suppression

EXTRA_TRYBOTS=Test-Ubuntu18-GCC-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_SK_CPU_LIMIT_SSE41

Original change's description:
> Revert "Remove GrCaps::SupportedRead::fSwizzle and supporting code"
>
> This reverts commit 1cec69ae5c.
>
> Reason for revert: Causing Valgrind failures
>
> Original change's description:
> > Remove GrCaps::SupportedRead::fSwizzle and supporting code
> >
> > Add weird color types that handle the swizzling.
> >
> > Change-Id: Ie37a00eb877fe5e519f7498bf749e02a2f1dc204
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230135
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com
>
> Change-Id: I710e1952f2cef1a1e6e7ccf408b8a71ce721c002
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231262
> Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
> Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>

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

Change-Id: I367f62ba7349b112d0a2eb5340a37be938ad5ef5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231178
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-01 00:17:54 +00:00
Hal Canary
c876404e64 tools/sk_app/macos: support command key
Change-Id: Ie04918f2bfc296eedbba67d96f62ee37e0303061
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231136
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-31 16:36:15 +00:00
Robert Phillips
0a15cc62a8 Propagate GrRenderable flag to GrCaps::getBackendFormatFromColorType
This makes calling GrCaps::getBackendFormatFromColorType equivalent to calling GrContext::defaultBackendFormat

Change-Id: Ic402245fa0502920c47c2a29aadc4e559abdc09b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230416
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-30 17:45:45 +00:00
Mike Klein
5591fdf930 small refactors
Change-Id: I58b52d3e1d05d0834be30e00d991636e227cbf0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230836
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-30 15:43:13 +00:00
Mike Reed
9dc0b9e2f8 remove code now that loopers are dead (w.r.t. canvas and paint)
We can't remove the loopers themselves, as they are still used
by android and chrome (they just don't ever pass them to skia).

Eventually each of those clients will resolve this, but for now
we just keep the classes (and tests) in skia.

Bug: skia:4783
Change-Id: I5f507e6bb82280f2bc7c0b21eebe59c287aa9265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230579
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-30 12:49:28 +00:00
Chris Dalton
88b448a713 skpbench: invoke 'adb wait-for-device' lazily
Bug: skia:
Change-Id: Ie1347f7ff2a2cfbd8c703ca323da807fb77a6c30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230127
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-07-29 16:49:59 +00:00
Mike Klein
bb413430e4 add a fast subset option and --dry-run
You can now pass files to rewrite, still defaulting
to all sources.  This speeds things up and is nice
for a Git or PRESUBMIT hook, added here too.

Passing --dry-run or -n will just check that the
files we would have written is the same, printing
the names of any mismatches and failing if any.

Cq-Include-Trybots: skia.primary:Housekeeper-PerCommit-CheckGeneratedFiles
Tricium: no
Change-Id: I94218f49071b8634841b04e4b536ad1ae5d9d5fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230143
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-07-26 18:32:43 +00:00
Mike Klein
66ed6a0cad tweak how we avoid rewriting vulkan includes
This may be splitting hairs, but it occurred to me that this
might be a clearer way of expressing what we're trying to do,
avoiding treating include/third_party/vulkan as our own.

Change-Id: I2bb3c2da5b2294cc219d3a3745a6b52dd09ec21d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229801
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-26 16:18:32 +00:00
Nathaniel Nifong
1b458e82c3 Format skpbench.cpp with tools/rewrite_includes.py
Change-Id: Ib3a1e21a6531c3995cbd7e530c3cf70e6f3fd2c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230125
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-07-26 16:01:32 +00:00
Nathaniel Nifong
fa40851288 Extend skpbench to play multi frame files.
Bug: skia:9209
Change-Id: I275cc3dfcdbf439f971e11ea6ced94db5e0689c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229481
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2019-07-26 14:23:36 +00:00
Brian Osman
fe49163cd1 Major rewrite of the particle system based on the SkSL interpreter
This removes all of the fixed-function particle affector classes.
Instead, each particle effect just has two SkSL snippets, one for
spawn logic, and one for update logic. Each one gets an inout copy
of the particle struct. Ultimately, this makes the effects much
simpler and smaller, while also being far more flexible (you can
do whatever you want with any values you want). Finally, because
the interpreter is vectorized and a particular effect's scripts
are usually tuned to the specific behaviors desired, it's faster
on basically every effect I compared.

I re-created all of the old effects in the new system. Many just
use pure SkSL (no curves or anything). Some of the old curve and
path/text stuff was very handy, though - so those are now exposed
as external values in the interpreter. Basically, an effect can
have any number of named "bindings" that are a callable thing.
This can be a path, text (shortcut for making fancy paths), curve,
or color curve. The path ones return a float4 with position and
normal, the curves return one or four floats.

... and this transposes all of the particle data storage into
SoA form, so that it can use the much faster interpreter entry
point.

Change-Id: Iebe711c45994c4201041b12d171af976bc5e758e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222057
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-07-25 19:59:03 +00:00
Ravi Mistry
5cc084bdfd [perf_skottiewasm_lottieweb] Script to parse and combine skottie/lottieweb perf CSVs
NoTry: true
Bug: skia:9237
Change-Id: I663a8b5ebdc789e3ba02291b5f801fb6fbbf5894
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229763
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-07-25 17:58:08 +00:00
Mike Klein
52337de95c re-run tools/rewrite_includes.py
PS2 adds a rewrite for Skia #include <...> to #include "...", letting
them be otherwise rewritten and sorted too.  (We do need one exception
for the Vulkan headers, which will otherwise be rewritten to always
point to our own.)  I don't think it's particularly important to
favor "" or <>, but picking one keeps things consistent.

PS3 adds a missing SkMutex.h include.

PS4 fixes a terrible readability problem.

Change-Id: Id9fe752727ef30e802b1daf755ee2ed15e267577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229742
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-07-25 15:40:33 +00:00
Hal Canary
a1730e18f1 SkMetaData: remove unused features
Change-Id: Iecd80244b3803b6d5916bfd793741e67f05d0d46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227437
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-07-25 15:15:22 +00:00
Brian Osman
699dadcc24 Skip non-D3D11 test contexts on Windows-on-ARM bots
The device only has D3D11 (no D3D9 or GL), so every unit test
failed to create three of the five context types. This wasn't
causing actual problems, but was filling the logs with a huge
amount of noise.

Bug: skia:9275

Change-Id: I78068b16a56918bc7dba2862834996fb07050438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229487
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-07-25 15:13:02 +00:00
Ravi Mistry
d6cb7aecf1 [perf_skottiewasm_lottieweb] Add new bots for LottieWeb_Canvas
Added new "backend" flag to lottie-web-perf.js and created a new lottie-web-canvas-perf.html file.

Bug: skia:9237
Change-Id: Ibca2f121666daf25fbbccac48fed80eb12ccedf7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229420
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-07-24 22:19:04 +00:00
Ravi Mistry
d15571af2e [perf_skottiewasm_lottieweb] Use 3 loops for more consistency
Bug: skia:9237
Change-Id: I3e0dcf713f66fe5b0de7f37b9e89c964a2af8f35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228998
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-07-23 23:31:04 +00:00
Florin Malita
5f240186ec [skottie] Ref-counted animators
Change-Id: I022c655c3f72551ccf6d35ba013fba6461e89a5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229389
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-07-23 22:40:14 +00:00
Mike Klein
84bcd0c3ae skvmtool upgrades
fix toy square program
  add a new toy plus_one program
  also run stock srcover programs
  time at N=15,255,4095

e.g.
            plus_one	 69 Mpx/s	435 Mpx/s	615 Mpx/s
              square	 73 Mpx/s	393 Mpx/s	527 Mpx/s
         srcover_f32	 19 Mpx/s	 38 Mpx/s	 39 Mpx/s
         srcover_i32	 36 Mpx/s	 89 Mpx/s	103 Mpx/s
   srcover_i32_naive	 34 Mpx/s	 85 Mpx/s	 91 Mpx/s
    srcover_i32_SWAR	 49 Mpx/s	169 Mpx/s	191 Mpx/s

Change-Id: Ie041603bf1b458472dd477c64a91c61162a362e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229396
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-07-23 17:46:35 +00:00
Robert Phillips
c80b0e9541 Make rest of GrGpu::wrapBackend* methods take a GrColorType (take 2)
This CL is intended to further wean Ganesh off of using the GrBackendTexture's pixel config

TBR=bsalomon@google.com
Bug: skia:6718
Change-Id: Iedaa7811f9c4aac552f219c702627bc476325317
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228338
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-23 16:13:30 +00:00
Brian Salomon
27b4d8d8db Remove sample count from GrSurfaceDesc.
This leaves just width, height, and GrPixelConfig. Once we remove the
latter we can replace GrSurfaceDesc with SkISize.

Also remove unused GrRenderTarget::overrideResolveRect

Also remove GrSurfaceProxy::Renderable and use GrRenderable instead.

Change-Id: I652fe6169a22ca33d199b144ec6385286ac07b5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228570
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-23 13:42:29 +00:00
Mike Reed
f702ed495e add 'r'epeat option sans the HUD (to not complicate the profile)
Change-Id: Ia95f2b2b86c83b1715dc46b07baa2fc547abdee3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229081
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-07-23 00:20:07 +00:00
Mike Reed
b7dad44040 Reland "hide drawlooper from paint"
This reverts commit 6dc14ded91.

Reason for revert: add flag to google3

Original change's description:
> Revert "hide drawlooper from paint"
>
> This reverts commit 766b42b7ba.
>
> Reason for revert: afaict this is changing a lot of image filter GMs for the worse
>
> Original change's description:
> > hide drawlooper from paint
> >
> > Bug: skia: 4783
> >
> > Change-Id: I1d0ad1683a2e8345d8ea13db9b69b568ada827dc
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228573
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Commit-Queue: Mike Reed <reed@google.com>
>
> TBR=fmalita@chromium.org,reed@google.com
>
> Change-Id: I0bfd48ada3f8e48a774527caccf7abdb7a1cc470
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia: 4783
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229005
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Ib3cd8941a63cd323b8872dd7fec1c953ab81cbdc
Bug: skia: 4783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229010
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-07-22 20:03:36 +00:00
Florin Malita
5372ebd373 [skottie-wasm-perf] Don't redraw unchanged frames
Bug: skia:9267
Change-Id: Ib10a0fd5829e61692b71e8d78c7ebee5a19a0a65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229013
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-07-22 19:32:36 +00:00
Robert Phillips
6dc14ded91 Revert "hide drawlooper from paint"
This reverts commit 766b42b7ba.

Reason for revert: afaict this is changing a lot of image filter GMs for the worse

Original change's description:
> hide drawlooper from paint
> 
> Bug: skia: 4783
> 
> Change-Id: I1d0ad1683a2e8345d8ea13db9b69b568ada827dc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228573
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: I0bfd48ada3f8e48a774527caccf7abdb7a1cc470
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia: 4783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229005
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-22 17:27:17 +00:00
Florin Malita
00d4f535c9 [skottie] Expose SG inval controller on seek()
- shift the revalidation phase from Scene::render() to Scene::animate()
 - pass an optional inval controller to Scene::animate() and Animation::seek()
 - hoist the showInval logic out of SkSG, into clients

This allows clients to track dirty regions and detect cases where no updates are needed.

Bug: skia:9267
Change-Id: I3d35bf58b6eee9bfeb6e127ba58e2b96713b772d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229001
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-07-22 16:33:15 +00:00
Mike Reed
766b42b7ba hide drawlooper from paint
Bug: skia: 4783

Change-Id: I1d0ad1683a2e8345d8ea13db9b69b568ada827dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228573
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-07-22 16:25:41 +00:00
Stephen White
3e45e128eb Update to Dawn ToT.
Switch to Dawn's version of dawn_generator.gni. This depends on having
a file called build_overrides/dawn.gni. However, this will also enable
us to use the upstream Dawn BUILD.gn files more easily in the future.
This required adding it to compile.isolate, so the bots can pick it up.

Keeping up with Dawn:
Rename TextureFormat enums.
Rename dawn::BufferUsageBit::TransferDst -> CopyDst.
Removal of GLAD dependency.
SPIRV-Tools update.

Change-Id: Idcd5d1035ed106485dd2503b829e3c3b57a5688b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228568
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-07-22 16:20:36 +00:00
Chris Dalton
c3318f09cd ccpr: Add an MSAA atlas mode
Adds the option to use a multisampled (or mixed sampled) atlas, and
uses the sample mask and stencil buffer instead of coverage counts.

Bug: skia:
Change-Id: I9fb76d17895ae25208124f6c27e37977ac31b5eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227428
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-19 20:52:17 +00:00
Brian Salomon
e8a766b16c Move GrProtected off GrSurfaceDesc and pass separately.
Change-Id: If628c13bb0e5aa885e4249a37432ba572e65d920
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228440
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-19 19:03:19 +00:00
Greg Daniel
00fb7243c0 Move read swizzle from GL ConfigInfo to FormatInfo.
With this change I also removed GrPixelConfig as param to supportedReadPixelsColorType().
This meant some updates had to be made to Vulkan and Metal to make sure they return the
right GrColorType.

Bug: skia:6718
Change-Id: I71b6360489cf499692c7b777e5915090fad05c56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228349
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-18 19:42:10 +00:00
Stephen White
985741a554 First draft of Dawn backend: clears are working.
First draft of (mostly stubbed-out) GrDawnGpu.
Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
First draft of DawnTestContext.
First draft of psuedo-fences for Dawn, implemented with MapReadAsync.

Change-Id: I443f3370522639e82f2fa0eebe6b206c372f13a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228137
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-18 18:09:12 +00:00
Robert Phillips
dd39980115 Revert "Make rest of GrGpu::wrapBackend* methods take a GrColorType"
This reverts commit 9725638fb1.

Reason for revert: Chrome roll

Original change's description:
> Make rest of GrGpu::wrapBackend* methods take a GrColorType
> 
> This CL is intended to further wean Ganesh off of using the GrBackendTexture's pixel config
> 
> Bug: skia:6718
> Change-Id: I593c0c73922fb76045e379214e20adb1f17ea215
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227780
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: Id71acf1dec63c288a858fccd7109c84cf3cc6f0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228337
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-18 12:28:17 +00:00
Robert Phillips
9725638fb1 Make rest of GrGpu::wrapBackend* methods take a GrColorType
This CL is intended to further wean Ganesh off of using the GrBackendTexture's pixel config

Bug: skia:6718
Change-Id: I593c0c73922fb76045e379214e20adb1f17ea215
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227780
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-17 20:00:05 +00:00
Greg Daniel
fad9fbc3c4 Revert "First draft of Dawn backend: clears are working."
This reverts commit 6cebea42a8.

Reason for revert: breaking google3 roll

Original change's description:
> First draft of Dawn backend: clears are working.
> 
> First draft of (mostly stubbed-out) GrDawnGpu.
> Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
> First draft of DawnTestContext.
> First draft of psuedo-fences for Dawn, implemented with MapReadAsync.
> 
> Change-Id: Id009436f4441f26ffbc82d485d7af3a499b3281b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226857
> Commit-Queue: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,senorblanco@chromium.org

Change-Id: Ie494b5a403e8537c6539551533ae8b9156e90a61
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228120
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-17 17:23:02 +00:00
Stephen White
6cebea42a8 First draft of Dawn backend: clears are working.
First draft of (mostly stubbed-out) GrDawnGpu.
Skeletons of GrDawnCaps, GrDawnGpuCommandBuffer, GrDawnRenderTarget.
First draft of DawnTestContext.
First draft of psuedo-fences for Dawn, implemented with MapReadAsync.

Change-Id: Id009436f4441f26ffbc82d485d7af3a499b3281b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226857
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-17 16:29:22 +00:00
Brian Salomon
f2c2ba99f6 Remove kRenderTarget_GrSurfaceFlag, instead pass GrRenderable.
This is the last surface desc flag, so remove flags from GrSurfaceDesc.

Bug: skia:6718

Change-Id: Id3ed66b161289927b62f40bfb1f6482cf544deda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227858
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-07-17 15:09:03 +00:00
Hal Canary
e574f1e409 [reland] SkMetaData: move from src/ to tools/
Original: https://skia-review.googlesource.com/c/skia/+/227436
Change-Id: Iec326027319f39b0402e1b5c03b327cb26249159
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227778
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-17 13:14:38 +00:00
Mike Klein
2616efda08 pin down arg() stride (a.k.a. type) info sooner
Arg strides are the reason JIT happens lazily in Program::eval() today
instead of proactively in Builder::done() or Program's constructor.  It
also just really doesn't make sense to delay this information... it's
not like you can change it up sanely between calls to eval().

The argument index now comes implicitly from the order of calling arg().
This may seem logically independent, but it prevents a weird situation
where you could use the same argument index twice with different
strides... not sure what that would mean.

Change-Id: I0f5d46e94a1ca112a72675c5492f17c0dd825ce0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227390
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-07-16 21:06:45 +00:00
Hal Canary
ff2e8fe65f sk_app, Sample: Unify InputState enum.
replace() {
      if git grep -q "$1")";
      then sed -i -e "s#${1}#${2}#g" $(git grep -l "$1");
      fi
    }
    replace 'k\([A-Za-z]*\)_InputState' 'InputState::k\1'
    replace '\(\(sk_app::\|\)Window\|Sample\|\)::InputState' 'InputState'

Change-Id: I4cc18814fb1fbdd1f240aabba05aae79c54a4841
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227642
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-16 14:51:03 +00:00
Robert Phillips
0902c98825 Pass GrColorType to the GrGpu::wrapRenderableBackendTexture chain of calls (take 2)
This is a step towards reducing our reliance-on/use-of the GrPixelConfig stored in the GrBackendTexture.

TBR=egdaniel@google.com
Bug: skia:6718
Change-Id: I316a98416c51f273e6ab578f9cbaea5f7adfe331
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227639
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-07-16 13:07:06 +00:00
Greg Daniel
fe88bf67c2 Revert "Pass GrColorType to the GrGpu::wrapRenderableBackendTexture chain of calls"
This reverts commit 5572737d95.

Reason for revert: Adreno 4xx bots hitting compatibility assert in InitialTextureClear test

Original change's description:
> Pass GrColorType to the GrGpu::wrapRenderableBackendTexture chain of calls
> 
> This is a step towards reducing our reliance-on/use-of the GrPixelConfig stored in the GrBackendTexture.
> 
> Bug: skia:6718
> Change-Id: I2170032bfbbb57423c4bb0d901ad014c61d38131
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223701
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I24cf6b3aa0dfca2e935a36592860ad91171b21a7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227637
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-16 00:33:13 +00:00
Greg Daniel
12e7585495 Revert "SkMetaData: move from src/ to tools/"
This reverts commit 9d844d8ce5.

Reason for revert: breaking google3

Original change's description:
> SkMetaData: move from src/ to tools/
> 
> Change-Id: If581c8ceeaa76985535cb7b6772742f0011cfe8e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227436
> Commit-Queue: Hal Canary <halcanary@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Auto-Submit: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=halcanary@google.com,bungeman@google.com

Change-Id: Ifadad46f0663b743d3e57bb6317707f2a2fac07d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227636
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-07-16 00:28:44 +00:00
Robert Phillips
5572737d95 Pass GrColorType to the GrGpu::wrapRenderableBackendTexture chain of calls
This is a step towards reducing our reliance-on/use-of the GrPixelConfig stored in the GrBackendTexture.

Bug: skia:6718
Change-Id: I2170032bfbbb57423c4bb0d901ad014c61d38131
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223701
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-07-15 20:40:09 +00:00
Hal Canary
9d844d8ce5 SkMetaData: move from src/ to tools/
Change-Id: If581c8ceeaa76985535cb7b6772742f0011cfe8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227436
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-15 18:45:09 +00:00
Hal Canary
fcf6359ce8 Sample not RefCnted; ClickHandling moved out of viewer
Change-Id: I23456144b267192928a1253692daf846329f2ab5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227067
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-15 17:59:15 +00:00
Ben Wagner
acf98df7a1 Remove WallTimer class.
Only used in three somewhat dubious places.

Change-Id: I7ccd1aef41f826d0eb62606751f4d3f0ceda267d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227065
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-07-15 16:06:11 +00:00
Ravi Mistry
4c5edc29fa [perf_skottiewasm_lottieweb] Add flag for use_gpu
If flag is true then run with headless=false and:
* --ignore-gpu-blacklist
* --enable-gpu-rasterization

NoTry: true
Bug: skia:9237
Change-Id: I8c3c40ee34fe3d3e92b41185c30afb91459a3f5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227060
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-07-12 18:21:57 +00:00
Florin Malita
aa04068be4 [perf_skottiewasm_lottieweb] Explicit window sizing
We're currently running with Puppeteer defaults (800x600), which
doesn't match our animation size.

  - set the Puppeteer viewport to 1000x1000
  - set the browser window size to the same

The latter is mostly useful for manual/non-headless runs.

Change-Id: Icce975ae89fc9375fdf7d8c458abf7223e844c82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227057
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2019-07-12 16:13:36 +00:00
Hal Canary
41248071ac tools: separate TimeUtils from AnimTimer
gm, slides, and samples no longer need to know about the implementation
details of AnimTimer.

This
    virtual bool onAnimate(const AnimTimer&);
becomes this:
    virtual bool onAnimate(double /*nanoseconds*/);
which is much easier to reason about.

AnimTimer itself is now part of viewer.

Change-Id: Ib70bf7a0798b1991f25204ae84f70463cdbeb358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226838
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-07-12 15:05:01 +00:00
Florin Malita
8590026dbf [perf_skottiewasm_lottieweb] Enable GPU tracing
Not consumed by any scripts ATM, but useful for manual trace inspection.

Change-Id: I2b2e2ad227278f6527454628475143294c655835
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226976
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2019-07-12 01:48:27 +00:00
Jim Van Verth
af545d7f8e Fix GL MSAA support in Mac Viewer.
The Mac GLContext is designed to not constantly teardown on resizes
and minor DisplayParams changes. However, for MSAA we do have to
tear it down.

Change-Id: I1a9d765068fa5f6b22dff49f6355c29e1affb686
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226850
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-07-11 22:31:43 +00:00
Jim Van Verth
d361e64326 Enable MSAA for Metal.
Adds a separate resolve texture to GrMtlRenderTarget, which can be used
to do a resolve for the main multisample color texture. The resolve is
handled by setting a special Store action for the RenderCommandEncoder.

Bug: skia:8243
Change-Id: I1ffd756c01a9b363116ffefee2c4c50ba9a3e637
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225536
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-07-11 20:57:24 +00:00
Ravi Mistry
649774b686 [perf_skottiewasm_lottieweb] Turn on skottie+wasm flush for a better comparison
This enables us to use the same termination checks as for lottie-web.

NoTry: true
Bug: skia:9237
Change-Id: I9d5d0c450196c3800020e12b45868c656cdcc46a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226858
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-07-11 19:58:25 +00:00
Jim Van Verth
658d499afc New approach to fixing Vulkan MSAA.
MakeFromBackendTextureAsRenderTarget is planned to be deprecated, so we
should use MakeFromBackendTexture with a sampleCount parameter instead.
On Vulkan, this ran into issues because we assumed an allocation for the
VkImage and the swapchain doesn't provide us with one. Fixed so we don't
need an allocation for Borrowed textures.

Bug: skia:
Change-Id: Ib26888020e093f4a734a4159eae898539c2273b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226839
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-07-11 18:34:19 +00:00
Ravi Mistry
37a4bedfc8 [perf_skottiewasm_lottieweb] Do 2 loops with 25 points each and then pick 25 from the middle
Doing this will avoid the unreliable frames at the start (setup related) and at the end (teardown related). Also:
* Increase timeouts in lottie-web-perf.js and skottie-wasm-perf.js since we are looping twice now.
* Fix bug where ret code was 0 if puppeteer test failed.

NoTry: true
Bug: skia:9237
Change-Id: I0933ecb87113b40c162712076c38fb7379b352d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226836
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-07-11 18:23:17 +00:00
Greg Daniel
e877dce203 Add kRGBA_8888_SRGB GrColorType and remove GrSRGBEncoded.
Change-Id: Iad1c72eb81ffd9c006e39c96191fada990d9dbd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226224
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-11 15:22:23 +00:00
Brian Osman
19ece744f9 Only include angle in default configs when it's enabled
Previously, running nanobench on Windows without ANGLE enabled would
immediately fail (unless you specified --config) with:

  No context was available matching config 'angle_d3d11_es2'.

Change-Id: I4a02f4f96a1c4366bee21e6cf379d53c3a086d23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226220
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-07-09 19:39:04 +00:00
Hal Canary
3a85ed12bf ModifierKey unifies sk_app::Window::ModifierKey & Sample::Click::ModifierKey
Change-Id: Idb5dfe57a7f6e3d6078ab1e68d542b084114cfbe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225735
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-09 16:16:41 +00:00
Jim Van Verth
778ba8a450 Re-enable Vulkan MSAA support in Viewer
Bug: skia:
Change-Id: I2e7fc5463ea73baa82e6f1a3340e9c88d1b8be32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226081
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-07-09 15:35:44 +00:00
Greg Daniel
627d053913 Move uses of functions taking SkColorType to GrColorType versions in GrCaps.
Change-Id: I4feda6277cf14be0d32a8ce22257902483d7ae1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225734
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-07-09 13:29:07 +00:00
Hal Canary
c74a55057b GM: s/handleKey/onChar/
Change-Id: I917de2705807f61e6a6c3f76d52e290e8194d204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225936
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-08 22:28:50 +00:00
Ravi Mistry
56065d9b87 [skottie-wasm-perf] Turn on chrome tracing
NoTry: true
Bug: skia:9237
Change-Id: Idca7e9417595a98ea86f4a90c98332963d0c86b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225897
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-07-08 20:53:40 +00:00
Ravi Mistry
b2be410c57 [lottie-web-perf] Use SVG renderer and turn on chrome tracing
Parse lottie file to calculate number of frames instead of doing it in the HTML (which would interfere with tracing numbers).

NoTry: true
Bug: skia:9237
Change-Id: Ie965591206b888919fd2c104f329d703bd099c11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225896
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-07-08 20:47:44 +00:00
Hal Canary
6cc65e1fda Samples: simplify Sample::Event
Change-Id: I1daaa9dcf56812bfd29dab64ee04dae63c2660e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225545
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-08 19:09:42 +00:00
Hal Canary
8a027312cd Samples: add name() virtual
Change-Id: I9b6e39bc7e35346bb73dfe014de1c8daa5a92f2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225428
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-03 17:41:16 +00:00