Commit Graph

51319 Commits

Author SHA1 Message Date
Florin Malita
3bfeab7d95 Reland [svg] Add svg_tool
A simple svg -> png converter, to demonstrate basic API usage.

TBR=

Change-Id: Id723946e2c1cbdaf324a24202279cb6a6d7082b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325460
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-12 16:18:27 +00:00
John Stiles
0f37907ac7 Undo call-count fix for intrinsic functions.
This CL is conceptually a revert of http://review.skia.org/320258,
although the code has changed shape a bit since that CL was landed.

This fix was too aggressive, and can lead to functions being dead-
stripped while they still have an active reference.

Change-Id: I6ce8b0ad9cc2a42e8be8cb10d3a8219149eca6aa
Bug: skia:10776
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325462
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-12 15:58:27 +00:00
Ethan Nicholas
5194a7018a moved SkSL FunctionReference/TypeReference data into IRNode
Change-Id: Ie3982e22c764455f3ae11472f6d1cacf4e9f64ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325458
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-12 15:54:13 +00:00
Brian Salomon
5ee0556048 Use ManagedBackendTexture in place of TestUtils backend texture helpers.
Unify on a single family of helpers for making backend textures.

Stresses callback systems in more tests by avoiding artificial
flush/submit/syncs.

some misc test cleanup along the way.

Change-Id: Ia692e8927ba97b391ee77ea06ebf437a555617b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324710
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-10-12 15:28:52 +00:00
Florin Malita
0f02d0b822 [svg] Add public.bzl defs for SVG source sets
Change-Id: I2c690b1e079494a3e1217330c3791d29bc37e27c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325337
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-10-12 15:23:57 +00:00
Ben Wagner
52c277ba3c Update site favicon to new theme.
Change-Id: I9666a2358489cf2492515ea2dab5cc8dcf475bb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324884
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-12 15:23:48 +00:00
Ethan Nicholas
ceb6214a55 moved SkSL InlineMarker and UnresolvedFunction data into IRNode
Change-Id: I05b940c69b7756d41277626fc3eef06003d133c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324886
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-12 14:29:37 +00:00
skia-autoroll
c67948d2c0 Roll SwiftShader from 952149303d06 to e72c6099f946 (7 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/952149303d06..e72c6099f946

2020-10-11 natsu@google.com Revert "Update virlg_hw path to reflect Minigbm"
2020-10-10 swiftshader.regress@gmail.com Regres: Update test lists @ 139f5c35
2020-10-10 natsu@google.com Update virlg_hw path to reflect Minigbm
2020-10-09 capn@google.com Fix depth bias calculations
2020-10-09 capn@google.com Move interpolant clamping out of interpolate()
2020-10-09 bclayton@google.com SpirvShaderDebugger: Fix store() of arrays
2020-10-09 bclayton@google.com SpirvShaderDebugger: Improve ASSERT() messages

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: robertphillips@google.com
Change-Id: I3c36d28ffedb99aa231d78c9bde1a205193f4d13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325320
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-12 14:04:27 +00:00
Matthew Leibowitz
07055b5e25 Parse out the orientation in the SubIFD of EXIF
Orientation information is sometimes stored in
the SubIFD section of EXIF, so read that. This is
just a matter of searching for the SubIFD offset
value in the EXIF tags and then parsing the
values from there onwards. The data format is
the same as the EXIF data.

The images are not under any copyright as I made
them up locally specifically for these tests.

Bug: skia:10799

Change-Id: I5384ffc1c4a9a0c7d3fc8510ef4da2f278cb8b97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323217
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-10-12 13:50:27 +00:00
Robert Phillips
91c752a014 Revert "[svg] Add svg_tool"
This reverts commit 2531de9926.

Reason for revert: Breaking some builds

Original change's description:
> [svg] Add svg_tool
>
> A simple svg -> png converter, to demonstrate basic API usage.
>
> TBR=
> Change-Id: I34417c437b91e97811f5db512a9e79aa5cc099b8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325336
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

Change-Id: I59117a1764a3a98bd910a3a76a44d9bba8bc2de4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325456
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-12 13:49:49 +00:00
Florin Malita
2531de9926 [svg] Add svg_tool
A simple svg -> png converter, to demonstrate basic API usage.

TBR=
Change-Id: I34417c437b91e97811f5db512a9e79aa5cc099b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325336
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-10-12 02:24:36 +00:00
skia-recreate-skps
d71dc2d25b Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Idba7ae9346115893f3847c39671cc37e4beaa23a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325216
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-10-11 06:26:35 +00:00
Brian Salomon
aa64c352b3 Remove legacy gpu blur util code
TBR:michaelludwig@google.com

Bug: skia:10818
Change-Id: I1326aa017c0ed000efee1b9e0372a12976ba09eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2020-10-10 12:52:04 +00:00
John Stiles
13fc260c70 Reject struct vardecls with modifiers.
These aren't allowed in GLSL, and typically don't make sense.

Change-Id: I0afca0df638590466922a809e91ef0be35b13ca8
Bug: skia:10765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324816
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 22:34:23 +00:00
Chris Dalton
61003cde76 Add support for WEBGL_multi_draw_instanced_base_vertex_base_instance
Bug: skia:10419
Change-Id: I82238c3115daa0c1879fe18a8f8af8199194be80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319936
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-09 22:12:03 +00:00
Brian Salomon
e4e0aad937 VulkanWindowContext uses sample-able swap VkImages when available.
MSAA now requires this.

Removes last use of SkSurface::MakeFromBackendTextureAsRenderTarget.

Bug: skia:9832
Change-Id: I2837aa0dd9e2cc999c5aac194816777bca477abe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324889
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-09 21:53:43 +00:00
Kevin Lubick
4f18a0c51e [canvaskit] Add job to compile GMTests js/wasm
Next step is to add the following task:
Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2

Bug: skia:10812
Change-Id: Ibe45b7205cebd30f0e7904ea6d93a01ea3df87fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324617
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-10-09 20:41:43 +00:00
Jim Van Verth
023f2e776e Use push constants cap in Metal.
* Sets the cap and uses it for verifying vertex/fragmentBytes size instead
of a magic number.
* Also makes maxPushConstantsSize unsigned to avoid warnings and
unnecessary casting.

Change-Id: I2aaea853604eb3c652ddbae3adb0168a4e41799a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324880
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-09 20:34:13 +00:00
Brian Osman
88cda17bbe Reorganization of IR generator's API and interaction with compiler
- Move all of IR generator's fields private (except for fContext, which
  is used ~everywhere).
- Eliminate start() and finish(), fold this logic into convertProgram.
  The division of what was set/reset in different places was pretty
  arbitrary. Now, convertProgram does everything. Along that line, have
  it actually return the "outputs" as an IRBundle (a small collection of
  the things that the compiler needs). This seems better than the
  compiler ripping out IR generator's internals.
- IR generator's POD field initialization was a mix of in-class and
  constructor. Move all the constant initialization to declarations.
- No need to look up sk_PerVertex at start (or convertProgram) time, so
  remove fSkPerVertex, and just do the lookup when we're about to use
  it.
- IRGenerator::convertProgram is fairly long now, but all the code is in
  one place. You don't have to think about the order that three
  different member functions are called (along with the caller mutating
  the internal state between those three calls).

- In the compiler, add an AutoSource helper to manage changing and
  restoring the fSource pointer everywhere.
- Rename the loadXXXIntrinsics functions to loadXXXModule, have them
  return the module, and wrap the whole thing up in a single
  moduleForProgramKind() helper.

Change-Id: I0c9b6702f8786792963e3d9408d6619e5ab393e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324696
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-09 20:29:03 +00:00
Greg Daniel
f707e9cc9d Don't set vk sampler on desc set if using immutable samplers.
This appeases a validation layer error. Its unclear if the validation
is correct saying this was an error before (since sampler param isn't
used when we have immutable samplers), but this isn't wrong either and
makes the layers not complain.

Change-Id: I88e8017df203965af0030b153ff933384a6215d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324698
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-09 19:00:43 +00:00
Jorge Betancourt
d5fec1788c Fix SkottieView demo app by handling branching issues
On some devices, SkottieView would crash on startup.
CL introducing bug: https://skia-review.googlesource.com/c/skia/+/310136

This was introduced in CL:
https://skia-review.googlesource.com/c/skia/+/310136

Change-Id: Ib9010707673e055964d5f0a471338097b3bf9910
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323596
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-09 18:56:03 +00:00
Jorge Betancourt
269e43fd98 update DEPS to point at oboe commit that fixes parsing library
Not an official release, but no noticeable differences.
We can point it to the next stable release when it incorporates the fix.

b02a12d1dd

Change-Id: I7c93eb50d3ee87ea4c1180be4cbab81a94449197
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324676
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-09 18:49:18 +00:00
Brian Osman
8b43dadea2 In SPIRVCodeGenerator, use the Program's ModifiersPool
We were passing in the IR generator's which had already been reset, so
technically belonged to the *next* Program to be compiled.

Change-Id: Ib68c283591f02d1642bb7c2d9658f5caa76b0f15
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324700
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 18:45:43 +00:00
Chris Dalton
141d35cdec Simplify the inflection/rotation finding math for stroke tessellation
Bug: skia:10419
Change-Id: I7754a1f19eea8630db3ede29e1ee7c79a53091bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322041
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-09 18:44:14 +00:00
Michael Ludwig
7563a48787 Revert "SkDevice::drawSpecial accepts arbitrary matrix v2"
This reverts commit 7c4aca04cc.

Reason for revert: cc unit tests need to be rebased

Original change's description:
> SkDevice::drawSpecial accepts arbitrary matrix v2
>
> This opens up the door to render image filter results with an arbitrary
> matrix, so we can skip the matrix filter DAG hack. It should also let
> me simplify the handling of backdrop image filters and correctly apply
> perspective to image filters.
>
> This is essentially the same as
> https://skia-review.googlesource.com/c/skia/+/317862
> but not parented to the CL that experimented with SkImagePaint.
>
> Some of the function declaration re-org that was done in its prior CL
> has been directly integrated into this CL.
>
> Bug: skia:9545
> Change-Id: Iad882bd306f3a4064fe60cfc0526226287ea7e29
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323597
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,robertphillips@google.com,reed@google.com,michaelludwig@google.com

Change-Id: I6a248fe9e02d71fa340ed3227e77fff097b7b08e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324704
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-09 17:58:45 +00:00
Brian Salomon
60003f776a Use BackendSurfaceFactory in Vk protected unit tests.
Automatically handles cleanup of backend objects.

Removes use case of MakeFromBackendTextureAsRenderTarget.

Bug: skia:9832
Change-Id: I27c2b4cae713bd605a662d38b797fd25c1add98e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324119
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-09 17:54:03 +00:00
Kevin Lubick
ffc20c2764 [canvaskit] Clean up some APIs related to Path factories
These were uncovered during the recent documentation fiesta.

This also adds a test for the previously untested
CanvasKit.Path.MakeFromOp API.

Bug: skia:10717
Change-Id: Icd3d31ec0f8d61bd399e76abdbf7b5c6395c4d85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324626
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-09 17:42:47 +00:00
John Stiles
efe767da91 Improve performance of SymbolTable lookups.
This CL introduces two significant changes:
- unordered_map is replaced by SkTHashMap.
- The StringFragment key is replaced by a SymbolKey class, which caches
  the hash of the string.

The second change is responsible for the lion's share of the measured
performance improvement. SymbolTable::operator[] was previously re-
hashing the string every time it recursed into the parent symbol table.

Nanobench shows a fairly consistent ~8% speed improvement in both
sksl_medium and sksl_large: http://screen/3KTc27gt85HS4wK

Change-Id: Ia1010dcd40d7f7ecdce1aa5bb10c6cf6f6f11a80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324628
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-09 17:39:34 +00:00
John Stiles
118706a806 Improve codegen for gradients.
Replacing `sk_OutColor = x` with `return x` in single-exit FP functions
results in fewer scratch variables in the final post-inliner output.

Change-Id: I81c081a78d0fb7dfad5230e3044027901673236c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324377
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-09 17:39:33 +00:00
Greg Daniel
f52bca1069 Suppress another version of the vulkan validation error.
Need the indexed version of the draw as well

Change-Id: I0b11687be1bb6126d963eb6ce99879525df2603f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324697
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-09 17:27:33 +00:00
Ethan Nicholas
7a95b20733 moved SkSL FieldAccess data into IRNode
Change-Id: Ib2fd8c246799a1bde566395080fe6617754644f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324635
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 16:58:33 +00:00
Adlai Holler
a7a404473c Migrate abandonment & reset methods to GrDirectContext
This is pretty much just cutting & pasting the code naïvely,
but it's the safe way to go so that we don't impact the
order of events during this housekeeping.

Change-Id: I8d9f2ffb560b34fd1a8d9603174ff1f17803e447
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324619
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-09 16:16:43 +00:00
Ethan Nicholas
453f67ff0a SkSL enum changes
Changed a couple of SkSL enums to enum classes and rearranged things to
make their storage within IRNode type safe.

Change-Id: I6509d027d79161c1a09473e90943aae061583f20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324624
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 15:54:13 +00:00
Greg Daniel
e70a30d46f Suppress vulkan validation layers bug.
This is a bug in the layers related to input attachments.

Change-Id: I1e44c45ce44bea79e7078836150237a6c63cbb36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324625
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
2020-10-09 15:37:54 +00:00
Ethan Nicholas
444ccc6e59 more SkSL IRNode refactoring
Prefix, Postfix, and ExternalFunctionCall nodes this time around.

Change-Id: I56bc06d73274f01b67f043a6ebd23dd4c80d16e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324621
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 15:22:33 +00:00
Greg Daniel
70dd6a9c1e Make sure the normal GrProgramDesc handles input attachment key.
Currently the entire GrVkPipeline does handle correctly keying if the
pipeline is using an input attachment since it is part of the render
pass key. However, using an input attachment does change the shader
and this was not getting reflected in the GrProgramDesc which is what is
used for caching spirv in the persistent cache. Thus we were having
errors switching msaa on and off since without msaa we use input
attachment but with msaa we used a copy. They were finding eachothers
spirv in the persistent cache.

Change-Id: I3200d6f640761ec1b1cd32e563b7c8be8e6a8481
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324477
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-09 15:13:53 +00:00
Michael Ludwig
7c4aca04cc SkDevice::drawSpecial accepts arbitrary matrix v2
This opens up the door to render image filter results with an arbitrary
matrix, so we can skip the matrix filter DAG hack. It should also let
me simplify the handling of backdrop image filters and correctly apply
perspective to image filters.

This is essentially the same as
https://skia-review.googlesource.com/c/skia/+/317862
but not parented to the CL that experimented with SkImagePaint.

Some of the function declaration re-org that was done in its prior CL
has been directly integrated into this CL.

Bug: skia:9545
Change-Id: Iad882bd306f3a4064fe60cfc0526226287ea7e29
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323597
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-09 14:56:43 +00:00
Brian Osman
3d87e9f660 Reorganize how SkSL includes are parsed and stored
This binds together the IntrinsicMap and SymbolTable for each include to
a single entity, with helper functions that create and return them. Used
a little bit of macro trickery to move all of the standalone/runtime
logic into loadIncludeFile, which drastically reduces boilerplate.

Change-Id: Ic70c0d67967cc614daeab5c50412ab69dcdf2fea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324124
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-09 14:49:43 +00:00
John Stiles
6f3015a562 Reland "Add sk_Caps.builtinDeterminantSupport and use it in cross()."
This is a reland of 6bbf026b54

Original change's description:
> Add sk_Caps.builtinDeterminantSupport and use it in cross().
>
> This CL partially relands http://review.skia.org/321790.
>
> Change-Id: I26a1aefda8a01167783e6e7fa15a51aa35ee5d82
> Bug: skia:10819, skia:10810
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323784
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Bug: skia:10819
Bug: skia:10810
Change-Id: I7731f93db07bc917707cbbe1daca2e5ce0f763d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324620
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-09 14:45:23 +00:00
Adlai Holler
9555f2934d Reland "Merge GrContext::init into GrDirectContext ..."
This reverts commit e9b9c3bd7f.

Reason for revert: Fixed MSVC

Original change's description:
> Revert "Merge GrContext::init into GrDirectContext ..."
>
> This reverts commit 48d8724097.
>
> Reason for revert: Breaking MSVC bots
>
> Original change's description:
> > Merge GrContext::init into GrDirectContext ...
> >
> > And minor cleanups associated with the initialization of these classes.
> >
> > Change-Id: Ida0372d0b1a0b8bf5b309814de5418e47ea34fdb
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324122
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Auto-Submit: Adlai Holler <adlai@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: I00b2ddaeaef53e3fe05a338c88158cf235f325c4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324132
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,robertphillips@google.com,adlai@google.com


Change-Id: I88bac7cd3aab070460671e82cbd924fbb42a2740
Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86_64-Release-Shared,Build-Win-Clang-x86_64-Release-Shared
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324616
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-10-09 14:42:43 +00:00
John Stiles
eaaa71b705 Add test for sk_Caps.mustGuardDivisionEvenAfterExplicitZeroCheck.
Change-Id: Ib1374e1dce1a654a83813dbe341774bd91729796
Bug: skia:10694, skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324356
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-09 13:48:13 +00:00
John Stiles
8f84cee9ab Add test for sk_Caps.inBlendModesFailRandomlyForAllZeroVec.
This CL also alphabetizes the various factories in ShaderCapsFactory.

Change-Id: I0378ceb821678173e72690d5563d2a9a92d90201
Bug: skia:10694, skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324257
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-09 13:44:43 +00:00
John Stiles
658ae8fc6a Reland "Put top level FPs into their own functions"
This reverts commit a8486d10e0.

Reason for revert: several performance issues have been fixed

Original change's description:
> Revert "Revert "Revert "Put top level FPs into their own functions"""
>
> Flutter saw a substantial perf regression:
> https://github.com/flutter/flutter/issues/62447
>
> This reverts commit 7a96c2a6bb.
>
> Change-Id: Ib7d73f2df429508d85f9681eb2f0afd84917772e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307782
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: Ie42ff7d5aff0a95f4533a31d60eac25c83b6defa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-09 13:20:03 +00:00
Ethan Nicholas
2a4952dcce refactored more SkSL IRNodes
Change-Id: Iab04e4915715bad56b795993022b24a137339daf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324125
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 13:17:33 +00:00
Greg Daniel
c0d6915389 Reland "Rename GrStencilAttachment class to generic GrAttachment"
This is a reland of 6113d50ec4

Original change's description:
> Rename GrStencilAttachment class to generic GrAttachment
>
> Additional this adds a UsageFlags member to the new GrAttachment
> class.
>
> Bug: skia:10727
> Change-Id: Ifc0bfffd959f5fbc46bfcdf269e1b2a933929753
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323107
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:10727
Change-Id: Ie0ff0885e01c9f0666fb0cfaa765e463dcc6d0a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324277
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-09 11:59:23 +00:00
skia-autoroll
aa8c461786 Roll Chromium from af82ff2606e9 to 4a368eae5a6f (468 revisions)
af82ff2606..4a368eae5a

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC jvanverth@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: jvanverth@google.com
Change-Id: Ib54ae51abc5f617e070f89003fc1567e1718aa92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324338
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-09 04:56:13 +00:00
skia-autoroll
df9bf325e4 Roll SwiftShader from 5f4e70b81046 to 952149303d06 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/5f4e70b81046..952149303d06

2020-10-08 bclayton@google.com SpirvShaderDebugger: Have Function inherit LexicalBlock

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC jvanverth@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jvanverth@google.com
Change-Id: Ic2ab37a61b7c330982bd1a38a2ccc40cfb193a68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324339
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-09 04:55:13 +00:00
skia-autoroll
0f82612ca5 Roll Dawn from 6b4a4a85dfd7 to 793a07e36636 (12 revisions)
https://dawn.googlesource.com/dawn.git/+log/6b4a4a85dfd7..793a07e36636

2020-10-08 senorblanco@chromium.org Fix MSVC build of SerialStorage.h.
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 6d6aed546061 to 4311dd05c883 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from f600d3aa9f26 to 6d6aed546061 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c169506c9e6e to f600d3aa9f26 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from eb5d3e147d39 to c169506c9e6e (2 revisions)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 71d69e5ed3f4 to eb5d3e147d39 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 5118c0726106 to 71d69e5ed3f4 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 1a63c49b4e86 to 5118c0726106 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 007dc42cbb43 to 1a63c49b4e86 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from fc5c5ab60b22 to 007dc42cbb43 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 66377ce9be54 to fc5c5ab60b22 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 28ae1471bf2c to 66377ce9be54 (1 revision)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC kainino@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: kainino@google.com
Change-Id: Ibc9050f325dc649d6d14dbf77891fec1b0478d09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324396
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-09 04:44:03 +00:00
Jim Van Verth
2ae1dd93d8 Revert "Add sk_Caps.builtinDeterminantSupport and use it in cross()."
This reverts commit 6bbf026b54.

Reason for revert: Breaking Metal bot.

Original change's description:
> Add sk_Caps.builtinDeterminantSupport and use it in cross().
>
> This CL partially relands http://review.skia.org/321790.
>
> Change-Id: I26a1aefda8a01167783e6e7fa15a51aa35ee5d82
> Bug: skia:10819, skia:10810
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323784
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=csmartdalton@google.com,johnstiles@google.com

Change-Id: I4a6c1a63dc38682dd965f78f0c1da98f35b6dbad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10819
Bug: skia:10810
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324264
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-09 00:12:34 +00:00
Brian Osman
1179fcf5ed Remove custom iterators from SkSL::Program
Instead, just expose the vector directly (as elements()).

Change-Id: I9f6a3ae38cd8e6f1b0a1087a42d61452fe883924
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324130
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-09 00:07:22 +00:00