Commit Graph

51154 Commits

Author SHA1 Message Date
Adlai Holler
1fc76ce6ff Migrate more Android & SkSurface API off GrContext
Migration should be free because (1) the non-Android API is
only loosening up to GrRecordingContext and (2) the Android API
can only see GrContext through including GrDirectContext.h

Change-Id: I97aa75baba0b0969361db6eaef9f83ea94183700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323557
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-08 18:32:32 +00:00
Kevin Lubick
adbd312a46 Fix debugger to work with new emsdk
Change-Id: I53fcf34e42604322f9e285de2bae4e37ccc60f6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324120
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 18:08:06 +00:00
Michael Ludwig
a1d668d24c Adjust w0 clipping plane distance
Confirmed that this avoided the too-aggressive clipping on the web pages
linked in chromium:1136046 and chromium:1128636

Bug: skia:9906
Change-Id: Id34233b8d7fc76bd80b43d3112c5073b240e6109
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323980
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-08 17:54:32 +00:00
Robert Phillips
d464feb1fc Rename GrThreadSafeUniquelyKeyedProxyViewCache
Once triangulated paths are added this will no longer just be storing proxy views.

Bug: 1108408
Change-Id: I82fa47b0b85f738d9a25330c29bc2892c9bfeda4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323999
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-08 17:39:12 +00:00
Kevin Lubick
2c08814f36 [pathkit] update to build with emsdk 2.0.6
Change-Id: I8df13d592abcd7e2b396250293b57037d2b4b774
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324117
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 17:26:32 +00:00
Ethan Nicholas
01ec7e8ec7 moved SkSL Setting data into IRNode and fixed its dehydration/rehydration
Change-Id: Ide129334989890961a46681129672682cf826915
Bug: skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323978
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 17:23:47 +00:00
Mike Klein
ba835bba45 tidy up SkTHash special methods
Like the destructors, most of these can just go unspoken.

SkTArray only knows its size in Debug builds, so it can't easily grow a
copy constructor.  Instead just keep the explicit copies and moves on
SkTHashTable, and mark the others as explicitly default.  I inverted the
pattern from assign-by-copy to copy-by-assign, but it's all basically
the same.

Change-Id: I0df552ef547ce9c7e232267c072a5f3b09197847
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324056
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 17:20:22 +00:00
John Stiles
796cdb7839 Use SkTHashMap to implement DefinitionMap.
The benchmarks show a negligible performance decrease over the bespoke
TinyUnorderedMap class, but it's well within the margin of error, and
a real hash map will scale better in pathological cases.

Nanobench: http://screen/537ETJivpGdVJpk

Change-Id: I21279c47742a5dac81d57c7e9f7da4bfc595fdc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323114
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-08 17:18:42 +00:00
Ethan Nicholas
ed84b73797 moved SkSL FunctionDeclaration data into IRNode
Change-Id: I97a59563914c4f75f8cfdc2bd5a9ae430de9bb3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323881
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-08 17:10:12 +00:00
Kevin Lubick
9eaca48f46 [canvaskit] Update emsdk to 2.0.6
Of note, I had to explicitly export _malloc and _free, since
we use those directly in the binding layer.

Code size change:
 -20k on JS (-1k compressed)
 -21k on WASM (-15k compressed)

Bug: skia:10419, skia:10794
Change-Id: Id7670b6fcbf1524ad3155a863db51eb49aa24811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323979
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 16:38:10 +00:00
John Stiles
9c0b79a354 Implement assignment and copy-construction for SkTHashSet/Map.
This will enable us to use SkTHashMap to store our definition maps.

Change-Id: I6017dfa71e1c5e68a20c97e955bb3d3abf347f0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323891
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-08 16:05:52 +00:00
Kevin Lubick
0039874105 [canvaskit] POC bindings for testing gms
In this CL, I forked compile.sh and created a new gm_bindings.cpp.
I also moved viewer.html into wasm_tools and created a gmtests.html
for testing out the bindings locally.

Right now there is only one gm file compiled in. I plan in a followup
CL to have some way to generate the list of cpp files that need to
be compiled in from gms.gni. I was unable to get it to work with
simply linking the lib_gm.gni, probably due to the same issue with
Registry that csmartdalton@ ran into when adding viewer.html
and the associated bindings.

Suggested reviewing order:
 - gmtests.html to get a sense of how the test flow works.
 - gm_bindings.cpp to make sure I setup the contexts/GMs correctly.
 - compile_gm.sh to see how the gms are compiled in.
 - The remaining files in any order.

When I tested this locally, the bleed_downscale digest was
exactly the same (pixel for pixel, byte for byte) as a known
digest in Gold, so I'm fairly confident in how things work.

Change-Id: I2babef848ca60f7db74e4adf27b8952a66bdeee1
Bug: skia:10812
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322956
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2020-10-08 16:03:08 +00:00
Ethan Nicholas
7868692b9d Moved SkSL VariableReference data into IRNode
As part of this change, broke up IRNode::type() and moved it into
virtual functions where it belongs.

Change-Id: Ib19e99f2e8392e34a20a1887b980225ac4b793f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323884
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 15:59:08 +00:00
Brian Osman
e3dcb1392d Remove inherited program element list (it's now unused)
Change-Id: I82d4aaf442be262ad8e397de4f820831f4797b95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323977
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 15:52:09 +00:00
Brian Osman
afa18eeb9a Put interface blocks into the intrinsic maps, too
We now support cloning global variables that are "declared" by an
InterfaceBlock, or a GlocalVarDeclaration. At this point, there are no
"inherited" elements - any mutable data that starts out owned by the
pre-includes is cloned.

Follow-up will remove the inherited element list entirely - splitting
this out to make the changes clearer.

Bug: skia:10589
Change-Id: I2a95c73bf53db313e9f3467c681a05dffffeaa3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323976
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-08 15:20:28 +00:00
John Stiles
99aa05339d Remove unused copy of DefinitionMap.
This appears to just be dead code.

Change-Id: I2a8510f2e8c15a833af72552a13c2a893b3b123a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323925
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-08 15:13:58 +00:00
Kevin Lubick
13c3633f84 [canvaskit] Update quickstart to use 0.19.0
This also links the main canvaskit landing page to the quickstart
and both pages to the Typescript types and documentation.

Bug: skia:10717
Change-Id: I843639651aa04e48bb13f995c15e4ee18fb348bd
No-Try: true
Docs-Preview: https://skia.org/?cl=323889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323889
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-08 15:12:08 +00:00
Brian Osman
6a204db32c Change interface block's fVariable from ref to pointer
The next pre-include refactor will require cloning InterfaceBlocks, and
re-targeting the variable.

Change-Id: Iccfc1f39789fcd572199682386cd612500334061
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323890
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 14:14:39 +00:00
Ethan Nicholas
dd21816b00 moved SkSL Ternary data into IRNode
Change-Id: I70e63aaa73082024c8f0887a941d54cfd12aa2b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323883
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 14:06:18 +00:00
Ethan Nicholas
8c44ecae4f moved SkSL If data into IRNode
Change-Id: Icccc14019ae5c87a09c8439fa1b1ae324b8e32bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323777
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 14:05:38 +00:00
Ethan Nicholas
1e9f7f36f7 changed various SkSL structs into classes
The goal is to have all of the IR structs be classes when the
rearchitecture is complete. Some of these should have been changed in
earlier CLs, and some of them never contained any data in the first
place and thus won't be affected by the rearchitecture.

Change-Id: Id5a3cebffd59a4c43b79f2195b50106ede7c2f87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323882
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 13:53:18 +00:00
John Stiles
b8cc665ffe Remove dedicated name from SymbolTable entries.
We now assume that the Symbol's name() is its actual name, instead of
having it passed it in by the caller. This simplifies calling code, and
also removes redundant symbol names from the Dehydrator, saving a few
hundred bytes here and there.

Change-Id: I3e3d65b238ea58ab52f5dca205458d6f45c06c3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323110
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-08 13:52:58 +00:00
Robert Phillips
fde67e4997 Add HW-filtered masks to thread-safe cache
Bug: 1108408
Change-Id: Iace1cea1c79a1f505a5b4da3a4d4c1a713e142ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323505
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-08 13:03:18 +00:00
Kevin Lubick
fc1f96f0f0 [canvaskit] Update npm to 0.19.0
This pushes the big name changes.

Change-Id: I8e2ab1707dc2e78cf03173d96d42691b703c7038
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323887
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 12:51:59 +00:00
Kevin Lubick
8d43858ed2 [canvaskit] Update jsfiddle links and fix renderSKP
Leftover API changes from removing Sk.

Bug: skia:10717
Change-Id: I5b3ab4b5e20212e734558437090600cf6387410c
Docs-Preview: https://skia.org/?cl=323886
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323886
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 12:51:15 +00:00
skia-autoroll
ac0723a06b Roll SwiftShader from 635de036d766 to 5f4e70b81046 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/635de036d766..5f4e70b81046

2020-10-07 capn@google.com Remove float division-by-zero prevention

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: Ief5ca746bc5c65b1ff895d76ca2540cf0477215b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323770
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-08 05:07:47 +00:00
skia-autoroll
757f6fb5c7 Roll Chromium from 3c77521707c0 to af82ff2606e9 (468 revisions)
3c77521707..af82ff2606

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: Ie30bab41bb1d7b96a10b620614a357ebfcad1e56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323836
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-08 04:56:57 +00:00
skia-autoroll
accb2e5de1 Roll Dawn from 7e22b1c44fb0 to 6b4a4a85dfd7 (9 revisions)
https://dawn.googlesource.com/dawn.git/+log/7e22b1c44fb0..6b4a4a85dfd7

2020-10-07 kainino@chromium.org Fix EntryPointTests WGSL shaders for Tint roll
2020-10-07 cwallez@chromium.org Buffer: Validate the offset is aligned to 8
2020-10-07 cwallez@chromium.org Roll our copy of the Vulkan headers.
2020-10-07 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from a388d56d9968 to 28ae1471bf2c (1 revision)
2020-10-07 dsinclair@chromium.org Re-enable disabled test.
2020-10-07 cwallez@chromium.org Buffer: Disallow unmapping when unmapped.
2020-10-07 cwallez@chromium.org dawn_wire: Guarantee OOM on MAX_SIZE_T sized buffers.
2020-10-07 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c9110b93cb8a to a388d56d9968 (1 revision)
2020-10-07 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 488d7a9346ff to c9110b93cb8a (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: I0b2b288892517d8f49fcb1f7b3e749bf193a5d41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323769
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-08 04:49:37 +00:00
Stephen White
38e6d226f2 Dawn: refactor texture uploading from GrDawnTexture to GrDawnGpu.
We'll need this for a proper implementation of onUpdateBackendTexture().

Change-Id: I4b9ac93934ef39ed3c82a55f7d74fc1f826f7740
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323558
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@google.com>
2020-10-08 03:47:58 +00:00
Ethan Nicholas
041fd0ad7d moved SkSL Variable data into IRNode
Change-Id: I53af66c1b65971c204ac7c515e0d0e39481b015d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323097
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-07 21:29:12 +00:00
Kevin Lubick
54c1b3dd43 [canvaskit] Remove Sk from nearly all function/type names.
This is a massive breaking change for all existing users of CanvasKit.

It will be (one of the only) changes in 0.19.0 to make the transition
easier.

Suggested reviewing order:
 - index.d.ts (to see type changes). Notice SkPicture still has Sk
   prefix, but no other types do (this felt "right" since Sk is
   part of the name of the type, but I can be swayed on this).
 - canvaskit-wasm-tests.ts
 - tests/*.spec.js
 - interface.js and helper.js
 - html examples
 - markdown files

Change-Id: I3b3d3815df2078f986893df3c70101d6248c117d
Docs-Preview: https://skia.org/?cl=322617
Bug: skia:10717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322617
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-07 21:01:32 +00:00
Michael Ludwig
99afada1ca Use SkIRect for desired output in skif::getInputBounds
In practice, callers of getInputBounds already have an output pixel
region they need covered by the image filter, so DeviceSpace<SkIRect>
is more appropriate than DeviceSpace<SkRect>

Change-Id: Ica062b59257966d12240201b7d942cbaed56adb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323598
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-07 20:38:12 +00:00
Sylvain Defresne
8d921a16f8 build: Remove no-op calls to set_sources_assignment_filter
Chromiun no longer use set_sources_assignment_filter() anywhere in the
build, so these are no longer needed.

Bug: chromium:1018739
Change-Id: I0e460922947430ed357838ff4196516d19c382a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323636
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-07 19:43:32 +00:00
Greg Daniel
8ade5e8aa6 Remove special handling of stencil formats and just use GrBackendFormts.
Before this change each backend had its own special stencil format
struct that contained information like the actual format, stencil bits,
etc. This change removes all of that and instead reliess on static
helper functions that can return all this information based on the
backend format.

Besides being cleaner, this change helps move towards being able to
combine all surface attachment classes into a unified class.

Bug: skia:10727
Change-Id: I26003e44f55ce32293e9092bafce5baef6f938d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322958
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-07 19:33:34 +00:00
Greg Daniel
a7f69c2906 Add stencil formats to all the backends.
Currently there is nothing using these formats, but this change just adds
them along with a quaries about their properties. They will be used in a
follow up change.

Bug: skia:10727
Change-Id: Iaaf13baf372799d47c65bd974fd204a32be57617
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322622
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-07 17:58:31 +00:00
Brian Osman
c021360a88 Only include one variable per declaration statement
This removes VarDeclarationsStatement entirely. VarDeclaration instances
appear directly as statements in Programs. SkSL that declares multiple
variables in a single declaration is transformed to represent that as a
series of VarDeclaration statements.

Similarly, global variable declarations are represented by
GlobalVarDeclaration program elements, one per variable.

Bug: skia:10806
Change-Id: Idd8a2d971a8217733ed57f0dd2249d62f2f0e9c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323102
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-07 17:27:01 +00:00
John Stiles
f41762a5da Remove accidentally repeated bit-index expression.
Also, remove unused #include of SkBitSet.

Change-Id: Ib1b903f78e835a75c8ba88ac35bfa270df7bc0e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322681
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-07 17:20:01 +00:00
Mike Klein
989f5bfb8f refactor HashAndEncode
Encode as PNG to an SkWStream instead of a path.
It's just as natural at the call sites, if not more so,
and is more flexible for environments without a filesystem.

While here, tweak the method names and add some comments.

Change-Id: I8ce9869471fc7e1a0955d51ecb621e76c2e1d4d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323509
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-07 16:13:13 +00:00
Robert Phillips
b1807129a6 Centralize CreateLazyView helper in GrThreadSafeUniquelyKeyedProxyViewCache
We'll also be needing this helper for HW-generated blur mask caching

Bug: 1108408
Change-Id: I60d91ae8864239f0cf68830d0a5b4266d27545d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323109
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-07 15:09:20 +00:00
Michael Ludwig
6c2f976a10 Update AutoLayerForImageFilter to use SkTCopyOnFirstWrite
Change-Id: Id3ee43fb72408f5bd0287f8b57b4a83109109aae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321778
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-07 15:02:10 +00:00
John Stiles
bb2e070d2e Rename ChunkBits to kChunkBits.
go/skiastyle: "Variables declared constexpr or const, and whose value is
fixed for the duration of the program, are named with a leading "k" and
then camel-capped."

Change-Id: Id9cf292a923d6b4db760975ffb7bc1a04c516e87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322440
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-07 14:55:00 +00:00
Jim Van Verth
8ffd4d750f Revert "Add a 2d cross product intrinsic to sksl"
This reverts commit 57c37ad0e4.

Reason for revert: Breaking the Mali400 bots.

Original change's description:
> Add a 2d cross product intrinsic to sksl
>
> Change-Id: Iebaf4616665547d6ca4900e1247d5b68e0f3512a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321790
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I3e1aa251e883e3d2a1170b0fc6cdc84ea06e784a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323556
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-07 14:35:51 +00:00
Robert Phillips
6e17ffe829 Add customData capability to the thread-safe proxy cache ...
and begin using it for cached SW-generated blur masks.

This is needed to begin mixing and matching HW & SW-generated blur
masks since they have different draw-rects.

It will also be useful if/when we add support for triangulated paths
to the thread-safe cache.

Bug: 1108408
Change-Id: I085ad1127dc2deb98b35d704b06e50b27c72fd1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322657
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-07 14:18:00 +00:00
John Stiles
8354e9b8f6 Fix data() method and add unit test.
I wrote code that called SkAutoTArray::data() and discovered that it
was broken, but not generating compile errors because it's part of a
template and never instantiated anywhere else. I fixed the
implementation and added it to our container unit test to prevent later
regression. This revealed another issue, that "containers in
SkTemplates.h [should] all have a consistent api", according to
test_container_apis. However, data() was never added to the non-array
container APIs. So I added data() to the other containers as well.

Change-Id: I52532c91fdab3fc8c4539053ba8420815b7b0ee5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323276
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-07 13:46:50 +00:00
Kevin Lubick
df47abcbb9 [canvaskit] Add make rule to check types
I don't think we need the extra bin folder; we should be
able to declare our types all in index.d.ts.

This also checks in the package-lock.json, now that we
have devDependencies to run those type checks.

`make typecheck` runs the typecheck tests.

The tsconfig.json and tslint.json were created following
the instructions at https://github.com/microsoft/dtslint
and using the DefinitelyTyped rules.

Bug: skia:10717
Change-Id: I7f943e9cfa264496e0d8932018ab1749702ab2c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322957
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-07 11:53:59 +00:00
Chris Dalton
57c37ad0e4 Add a 2d cross product intrinsic to sksl
Change-Id: Iebaf4616665547d6ca4900e1247d5b68e0f3512a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321790
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-07 08:38:59 +00:00
skia-autoroll
439af79f26 Roll SwiftShader from afe6ca45b6da to 635de036d766 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/afe6ca45b6da..635de036d766

2020-10-06 srisser@google.com Replace WARN with a LOG_TRAP
2020-10-06 srisser@google.com Reflect VK_KHR_create_renderpass2 being core
2020-10-06 zzyiwei@google.com Update Vulkan headers to version 1.2.156

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: I818260981a3162fdc432720dec6e3bed8148c694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323206
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-07 04:55:38 +00:00
skia-autoroll
c90e776661 Roll ANGLE from 77e3d0ae97b6 to 3df629c55d89 (20 revisions)
77e3d0ae97..3df629c55d

2020-10-06 ynovikov@chromium.org Fix a crash in FormatStringIntoVector
2020-10-06 lexa.knyazev@gmail.com Vulkan: Implement OES_draw_buffers_indexed
2020-10-06 jmadill@chromium.org Capture/Replay: Don't capture deleted shaders.
2020-10-06 jmadill@chromium.org Test Utils: Read available stream data on posix.
2020-10-06 courtneygo@google.com Vulkan: Move CommandBatch for threading support
2020-10-06 jmadill@chromium.org Capture/Replay: Complete RasterizerState capture.
2020-10-06 jmadill@chromium.org Add a --no-finish option to the perf tests.
2020-10-06 jmadill@chromium.org Capture/Replay: Fix temp shader ID.
2020-10-06 m.maiya@samsung.com Vulkan: Add OES_sample_shading extension support
2020-10-06 jmadill@chromium.org Perf Tests: Run at least 1 step.
2020-10-06 ianelliott@google.com Vulkan: Plumb OpenGL ES commands to AGI/debuggers
2020-10-06 lexa.knyazev@gmail.com Add BlendIntegerTest.MRT
2020-10-06 liaoyuke@chromium.org Rename ui/ozone/ozone.gni to build/config/ozone.gni
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from f15133788010 to 63cc22d645ba (4 revisions)
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from b588cd4df419 to c7d7610581df (4 revisions)
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b3c1e71eb1cb to afe6ca45b6da (4 revisions)
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 7c07085ad1cc to 3610ce9fa2d8 (1 revision)
2020-10-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 78d150eb2790 to edbb6564c87b (486 revisions)
2020-10-06 ianelliott@google.com Work-around test runner & DebugAnnotator
2020-10-06 jmadill@chromium.org Test Runner: More docs.

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-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:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: jvanverth@google.com
Test: Test: *debug_negative_coverage*
Change-Id: Iee551de01a1d5f75a2e70e9924115f2a8c501734
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323336
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-07 04:53:28 +00:00
skia-autoroll
3a10ae10dc Roll Chromium from 4259b6b6cb0f to 3c77521707c0 (463 revisions)
4259b6b6cb..3c77521707

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: Ife4d55858258078fb3442124230624df0904aae9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323316
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-07 04:49:38 +00:00
skia-autoroll
b81fdbee92 Roll Dawn from 326e14f34bb5 to 7e22b1c44fb0 (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/326e14f34bb5..7e22b1c44fb0

2020-10-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 90ee6c436017 to 488d7a9346ff (2 revisions)
2020-10-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d3f75ca0e8be to 90ee6c436017 (56 revisions)
2020-10-06 enga@chromium.org Reland "Add a per-thread proc table using thread local storage"
2020-10-06 tandrii@google.com infra: Remove no longer used refs.cfg.
2020-10-06 vadimsh@chromium.org infra: Stop statically enforcing Xcode version.
2020-10-06 enrico.galli@intel.com Add support for depthBias, depthBiasSlope, and depthBiasClamp

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: I130ec098cfb5e6662bc1b6839148cdac6d97cb6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323205
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-07 04:37:08 +00:00