Commit Graph

47652 Commits

Author SHA1 Message Date
Brian Salomon
97c98f9596 Revert "Reland x2 "Drawing YUVA images does not flatten for bicubic.""
This reverts commit 9b22838da3.

Reason for revert: bad GM results.

Original change's description:
> Reland x2 "Drawing YUVA images does not flatten for bicubic."
> 
> With fix for dumb coord mistake.
> 
> This reverts commit 6cb8168c2b.
> 
> Change-Id: If5385d16339c2b2b03eeff4ddd65c601e672d3dc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278783
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: I1143413f841182d39f5dc3eb4593fa98edf1bed4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278858
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-24 18:59:43 +00:00
Greg Daniel
83ed213216 Implement submission of d3d command lists and tracking of when they finish.
Also moves the ownership of the command list allocator to the GrD3DCommandList.
Added a destroyReosurce method to GrD3DGpu to start handling destruction of
objects that we make.

Change-Id: I28dbaf2b8c9d45fe70992879afb8211346eeb269
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278778
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-03-24 18:06:53 +00:00
skia-autoroll
0f4eba56b7 Roll skia/third_party/skcms cbf3b9df1ae1..bd0abcd0646a (1 commits)
https://skia.googlesource.com/skcms.git/+log/cbf3b9df1ae1..bd0abcd0646a

git log cbf3b9df1ae1..bd0abcd0646a --date=short --first-parent --format='%ad %ae %s'
2020-03-24 mtklein@google.com add _sRGB 8888 formats

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

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC robertphillips@google.com,mtklein@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/+/master/autoroll/README.md

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

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Bug: None
Change-Id: Ia22a284653b8b16f2738518d426027ad0449afa3
Tbr: robertphillips@google.com,mtklein@google.com
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278803
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-24 18:03:33 +00:00
Michael Ludwig
4519134e07 Implement GrTAllocator in terms of GrBlockAllocator
Previously, the GrAllocator header defined three types: GrAllocator,
GrTAllocator, and GrSTAllocator. GrAllocator was generic, and would
manage the blocks of memory (fixed size to hold N * sizeof(item)). It
stored an SkTArray of pointers to each block. GrTAllocator wrapped
the GrAllocator to add template support for a specific T. GrSTAllocator
extended GrTAllocator to include a template arg for inline storage.

In this CL, GrAllocator is no longer defined, and its memory functionality
is replaced with the use of GrBlockAllocator. For the most part, the
implementation of GrTAllocator on top of GrBlockAllocator remains the
same, although there is explicit array to the block pointers so indexing
is slightly different. GrSTAllocator is also removed entirely, so that
GrTAllocator's template includes initial storage size.

The iteration over the allocated items
is updated to wrap GrBlockAllocator's block iterator, and then iterate
by index within each block. Documentation on GrAllocator already recommended
using the iterator instead of random access, and these changes further
reinforce it. It turns out that many of the use cases of GrAllocator
were written to use random access, so many of the files outside of
GrAllocator.h have just been updated to use the new for-range iteration
instead of a random access for loop.


Change-Id: I28b0bc277c323fd7035d4a8442ae67f058b2b64c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272058
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-03-24 18:00:33 +00:00
Brian Salomon
9b22838da3 Reland x2 "Drawing YUVA images does not flatten for bicubic."
With fix for dumb coord mistake.

This reverts commit 6cb8168c2b.

Change-Id: If5385d16339c2b2b03eeff4ddd65c601e672d3dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278783
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-24 17:32:13 +00:00
Ben Wagner
9069bfe32c BlendFormula to validate in constructor.
A now removed comment claimed that validation could not be done in the
constructor in C++11, but it turns out that it can be done. Move the
validation to construction time and remove all validation done at other
times.

Change-Id: I267d3063fac3dc702efae71841cbd7424b19af31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278597
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-03-24 17:23:13 +00:00
Robert Phillips
9b00f1ff54 Make skia_use_xps option work on Windows
Some may not want to always compile XPS on Windows

Change-Id: Icd4cc993667fdce740216b9c52a0a649dcf79645
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278782
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-24 17:09:33 +00:00
Dominic Mazzoni
c227f4a826 Add support for tagging link annotations in PDFs.
Properly tagging links in PDFs just required a small change: at the time
an annotation is drawn, we need to keep track of the bounding rect, the
url and/or named destination, and now additionally the node ID. Instead
of keeping track of separate maps of rects/urls and rects/dests, this
patch combines them into a vector of SkPDFLinks.

Then, at the time the annotation is written to the file, an object
reference to that annotation can be saved and passed to the document
structure tree, where it can be included as an additional child of
the node with that node ID.

That allows for properly tagging the link and optionally giving it alt
text (like for an image link).

Bug: chromium:1039816
Change-Id: I97e47d3c70949020c3e0a69b8c9fc743748f3a7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277426
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-03-24 15:52:55 +00:00
Brian Salomon
14ed8855ba Ignore local matrix when choosing CT uni type with explicit sampling.
The GP's local matrix is ignored when explicitly sampling FPs.

Add asserts to check consistency.

Change-Id: I6fc063e223affa3115f00eb63454ae5e6c1c27eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278779
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-24 15:17:24 +00:00
Robert Phillips
0cf2b644a5 Add missing files to Dawn build
This adds the RenderPassBuilderD3D12 files and ignores a narrowing error in them.

Change-Id: Ie9ebc1608ad6bbbc48e0f1cd8d54a9213d9836a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278777
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-24 14:42:54 +00:00
Robert Phillips
cb77eab343 Revert "Switch to using a Float32Array (bound as value array) for color."
This reverts commit 4e79b6730d.

Reason for revert: Bad canvaskit GM images

Original change's description:
> Switch to using a Float32Array (bound as value array) for color.
> 
> Change-Id: I1bcca931954b1399c79f4074a3d57a68847ac785
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276757
> Commit-Queue: Nathaniel Nifong <nifong@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=kjlubick@google.com,nifong@google.com

Change-Id: I2f5e995ccee415a49f813b5ba61c095acbc445b5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278766
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-24 14:20:04 +00:00
Nathaniel Nifong
4e79b6730d Switch to using a Float32Array (bound as value array) for color.
Change-Id: I1bcca931954b1399c79f4074a3d57a68847ac785
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276757
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-03-24 13:32:55 +00:00
skia-autoroll
e5ca6ba2c8 Roll third_party/externals/angle2 31e36a631345..6fead3754375 (1 commits)
31e36a6313..6fead37543

git log 31e36a631345..6fead3754375 --date=short --first-parent --format='%ad %ae %s'
2020-03-23 jmadill@chromium.org Vulkan: No-op redundant FB state changes.

Created with:
  gclient setdep -r third_party/externals/angle2@6fead3754375

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 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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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
Bug: None
Tbr: robertphillips@google.com
Change-Id: If53d3586bcc344b288b7923f3c265bb64e050f1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278739
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-24 04:45:04 +00:00
skia-autoroll
e0d7bd448e Roll third_party/externals/swiftshader 22d73d15e778..6c11cf2ad9ca (5 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/22d73d15e778..6c11cf2ad9ca

git log 22d73d15e778..6c11cf2ad9ca --date=short --first-parent --format='%ad %ae %s'
2020-03-24 capn@google.com Remove unused sampler parameter
2020-03-24 capn@google.com Specialize sampling routine for immutable sampler data
2020-03-23 amaiorano@google.com CMake: make SWIFTSHADER_DCHECK_ALWAYS_ON work on Windows
2020-03-23 chrisforbes@google.com Refactor vertex fetch to use VkFormat more aggressively
2020-03-23 bclayton@google.com Merge changes I2b7adc3c,I5873dfa8

Created with:
  gclient setdep -r third_party/externals/swiftshader@6c11cf2ad9ca

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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: robertphillips@google.com
Change-Id: I5a4766b738603631cb14fc71088015fffbe5a868
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278737
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-24 04:32:34 +00:00
skia-autoroll
efc9d4f0ec Roll ../src be0a271f02d3..6af71a8d4b35 (354 commits)
be0a271f02..6af71a8d4b


Created with:
  gclient setdep -r ../src@6af71a8d4b

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 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/+/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
Bug: None
Tbr: robertphillips@google.com
Change-Id: I2b47f242fd9a996cfacda6b3ccfcaca8697742c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278738
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-24 04:29:24 +00:00
Brian Salomon
6cb8168c2b Reland "Revert "Drawing YUVA images does not flatten for bicubic.""
This reverts commit 0bfb7a5206.

Reason for revert: bad async_rescale_and_read_dog_up results

Original change's description:
> Revert "Revert "Drawing YUVA images does not flatten for bicubic.""
> 
> This reverts commit d198821906.
> 
> Change-Id: I53c8d7dd783130266cb5a3e96586baf62896f82c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278676
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: Ic400ddf273d747eaeea39a104fde3cb456ba9d17
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278678
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-24 02:50:14 +00:00
Florin Malita
c97c900724 [sksg] Remove redundant BUILD.gn deps
Skottie pulls SkSG as needed, we prolly don't need all these explicit
deps.

TBR=
Change-Id: I7a641c5b0a5be52185c240ba522f0758e79aff85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278677
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
2020-03-23 23:50:04 +00:00
Brian Salomon
0bfb7a5206 Revert "Revert "Drawing YUVA images does not flatten for bicubic.""
This reverts commit d198821906.

Change-Id: I53c8d7dd783130266cb5a3e96586baf62896f82c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278676
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-23 23:46:34 +00:00
Brian Salomon
d198821906 Revert "Drawing YUVA images does not flatten for bicubic."
This reverts commit ecd58077b2.

Reason for revert: red

Original change's description:
> Drawing YUVA images does not flatten for bicubic.
> 
> Simplifies bicubic relationship with child FP. Does not propagate coord
> transform up. It does not need a uniform to control offsetting and
> normalization.
> 
> Modifies imagefromyuvtextures GM to test all filter qualities with
> drawImage, drawImageRect, and image shader for YUVA and pre-flattened
> image for comparison.
> 
> Change-Id: Ic07cfdaac8a0fd1968314afe151dc218db862705
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278472
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I237c7965af00dece40d0d7ef3f3e93db7b2b3c02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278656
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-23 22:32:24 +00:00
Mike Reed
bcb46c06c7 Add approx_pow/log2/pow2 to SkVM builder
... in support of programs for colorspacexforms

Change-Id: I72ace09f10511ef8994038a4af3feab8bc1a299e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278466
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-23 22:17:04 +00:00
Brian Salomon
ecd58077b2 Drawing YUVA images does not flatten for bicubic.
Simplifies bicubic relationship with child FP. Does not propagate coord
transform up. It does not need a uniform to control offsetting and
normalization.

Modifies imagefromyuvtextures GM to test all filter qualities with
drawImage, drawImageRect, and image shader for YUVA and pre-flattened
image for comparison.

Change-Id: Ic07cfdaac8a0fd1968314afe151dc218db862705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278472
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-03-23 21:22:43 +00:00
Brian Osman
3c358420df Support for custom vertex data in SkSL and drawVertices
Adds a 'varying' modifier to the SkSL frontend. Only valid
for pipeline stage (runtime effect) SkSL programs, and only
on variables that are float, or float[2-4].

Runtime effect SkSL can declare varyings. The effect gathers
and reflects them. The GPU backend uses SkShader_Base's new
asRuntimeEffect() to get this data.

GrDrawVerticesOp and its GP get the shader's effect, if any.
They use this to add vertex attributes, varyings, and global
variables (in the fragment shader) of the appropriate width.
The globals have procedurally generated names, based on
their index in the list ("_vtx_attr_%d"). The GP's fragment
code copies the varyings to the globals.

When PipelineStageCodeGenerator sees a varying reference,
it just replaces that with the procedurally generated name
that matches the logic in the op.

Change-Id: I0effbc4f3425d452cb7d62e51e268f3b48fa3c74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275962
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-23 19:52:53 +00:00
Mike Reed
f5ff4c25a0 add loadF() and storeF() helpers to Builder
Change-Id: I5fe1ca090868cfb9fa930753232e9cbb42737d9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278473
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-23 19:25:43 +00:00
Greg Daniel
e52c9784f0 Add GrD3DCommandList class.
This doesn't do much except creates the new class.

Change-Id: I157abaddd173bf1b6ab5eba2539e90c4d530a273
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278469
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-23 18:58:27 +00:00
Brian Osman
0b22f3bc53 Remove workaround for ANGLE + NVPR + Persistent Shader Cache
ANGLE no longer supports NVPR, so this isn't necessary.

Change-Id: I68e720f17238c960e6f6ca07fe108f5fefed7705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278467
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-23 18:48:53 +00:00
Robert Phillips
709e2408fe Revert "Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time"
This reverts commit bc0fe058f8.

Reason for revert: red

Original change's description:
> Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time
> 
> These aren't high priority but it would be nice to have all the ops go through the same system.
> 
> Bug: skia:9455
> Change-Id: Idbd8b0829faf12703c82f5a016f5b0e7c3efb762
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277757
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I579ad16f144d17afaec9ee1b9000eaaa5c04228c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278508
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-23 18:29:33 +00:00
Mike Reed
165b68ebb6 Add onProgram to ModeColorFilter
Change-Id: Id82cfc632f378054f5ecded2c5a77d2824982288
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278420
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-23 18:21:33 +00:00
Mike Reed
cb1a2df616 skvm for picture-shader
After this, it appears that the only remaining shaders w/o skvm are:
- perlinnoise
- lighting
- runtime (sksl)

EmptyShader doesn't, but it is supposed to return failure.

Change-Id: Iab2393e1846b92089de837614ba1fb5543a76432
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278419
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-23 18:02:53 +00:00
Robert Phillips
bc0fe058f8 Make TessellationTestOp and GrPipelineDynamicStateTestOp surface their programInfos at record time
These aren't high priority but it would be nice to have all the ops go through the same system.

Bug: skia:9455
Change-Id: Idbd8b0829faf12703c82f5a016f5b0e7c3efb762
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277757
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-23 17:39:23 +00:00
Mike Klein
913a6f5508 impl A8/G8 skvm image shaders
Update the shader convention to pass unpremul paint color instead of
premul, still in dst color space.  This is what A8 image shaders need,
and it's cheaper to premul if we end up needing that than to unpremul.

Change-Id: I25d0ef60433670513e2cd24a385d74a506e8af58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278496
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-23 17:22:33 +00:00
Mike Klein
a434e0feb0 pass paint color and full dst info to shaders
- SkImageShader and SkRuntimeEffect will need the paint color
  - SkPictureShader will want the dst color type

Most of the interesting changes are in SkVMBlitter.cpp.

Incidentally factors Builder::uniformPremul() out of SkColorShader.
I thought I'd use it in SkVMBlitter, but ended up not using it.

For now I pass the real SkAlphaType to shaders, not a masked version.
Probably harmless, maybe useful... let's find out.

No diffs.

Change-Id: I49c2639f6a8d2d6a45eaceed9d8c33dbc0d9a538
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278484
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-23 17:21:43 +00:00
Julia Lavrova
99ede42ffe Some bengali text does not have cluster index in ascending order
Bug: skia:10050
Change-Id: Ia8933d43e9c08687e52398528460b98eb5d59935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277464
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-03-23 16:23:43 +00:00
skia-recreate-skps
15fc10269d Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Id266b0c1776d0e305020770588992b3f371f0f53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278491
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-23 16:08:33 +00:00
skia-autoroll
4098719375 Roll third_party/externals/angle2 cb7e7387e61f..31e36a631345 (2 commits)
cb7e7387e6..31e36a6313

git log cb7e7387e61f..31e36a631345 --date=short --first-parent --format='%ad %ae %s'
2020-03-23 lexa.knyazev@gmail.com Reland "Refactor BitCount"
2020-03-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 1c9f24263e6c..22d73d15e778 (1 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@31e36a631345

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 robertphillips@google.com,brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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
Bug: None
Tbr: robertphillips@google.com,brianosman@google.com
Change-Id: Ic34429611278eb739560390ff19d207b9ad40ab5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278486
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-23 15:36:04 +00:00
Robert Phillips
cad8fba253 Make GrFillRRectOp a GrMeshDrawOp
I don't know why this wasn't always a meshDrawOp. Bringing it into the fold reduces some of the boiler plate code and centralizes things.

Bug: skia:9455
Change-Id: Icd71907c3dc2ecefe4a2040293f94884678bbf45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278179
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-23 15:01:43 +00:00
Brian Salomon
8d1dcd7d98 Specialize scale+translate transforms for explicitly sampled FPs.
This is to support using YUV->RGB in more places where we would incur a
full 3x3 matrix multiply for each plane in the fragment shader without
this.

Change-Id: I27c2a403429c36662eba91f61b08e5331ec678b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278356
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-23 15:00:33 +00:00
Mike Klein
973236fcd4 remove dither TODO
This TODO is done: since we moved dither up into the shader color
pipeline, this implementation now does make sense for unpremul dsts.

Wanted to get this out of the way before threading through an
SkColorInfo so I'm not tempted to break it once I have the dst
SkAlphaType available.  :)

Change-Id: I0bce99649bed9e0051ccd6a69775716e38a458f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278480
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-03-23 14:35:53 +00:00
Mike Klein
4d1a90b26e smarter SkColorInfo::isOpaque()
We already look at the alpha type.
We can look at the color type too.

This doesn't likely matter very often, as we usually have
kOpaque_SkAlphaType for opaque SkColorTypes, but might as
well toss this in there for completeness.

Change-Id: Ie164acc9294dee115d8e0637e3186a301ebe58f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278479
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-23 14:28:33 +00:00
Eric Boren
0f9d5bdd7f [infra] Fix lottie-ci bots to use the correct asset name
Broken in https://skia-review.googlesource.com/c/skia/+/276641

Change-Id: I0ba616c5b117a2deed3b7d47b2b1b659d6914e1b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278458
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-03-23 14:21:23 +00:00
Kevin Lubick
6f60a859c6 Fix matrix scoping issue in sample
Change-Id: Id0023a12a21957ec9236d4ffaa03134995388d60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278456
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-23 13:44:53 +00:00
Eric Boren
59e7496d4e [infra] Move logic about skps/images/etc into gen_tasks
Change-Id: I72a1d6bd489994052c942b5c8f2e36806459360c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276641
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2020-03-23 13:42:43 +00:00
skia-autoroll
f04f21a5c9 Roll third_party/externals/swiftshader 1c9f24263e6c..22d73d15e778 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/1c9f24263e6c..22d73d15e778

git log 1c9f24263e6c..22d73d15e778 --date=short --first-parent --format='%ad %ae %s'
2020-03-20 amaiorano@google.com Subzero: fix CoroutineBegin generation

Created with:
  gclient setdep -r third_party/externals/swiftshader@22d73d15e778

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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: robertphillips@google.com
Change-Id: I27e7ea288ee2d60d261803a7a82f59eda42cfd90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278436
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-23 04:33:03 +00:00
skia-autoroll
c23bd5e4e3 Roll ../src e0f773c501f9..be0a271f02d3 (446 commits)
e0f773c501..be0a271f02


Created with:
  gclient setdep -r ../src@be0a271f02

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 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/+/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
Bug: None
Tbr: robertphillips@google.com
Change-Id: I6a389b090e75edfd5635fa55a455f730529035e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278437
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-23 04:31:23 +00:00
skia-autoroll
538e358b0d Roll third_party/externals/angle2 dadeffa315e7..cb7e7387e61f (28 commits)
dadeffa315..cb7e7387e6

git log dadeffa315e7..cb7e7387e61f --date=short --first-parent --format='%ad %ae %s'
2020-03-21 ynovikov@chromium.org Remove 32-bit Subzero GLES31 SwANGLE suppressions
2020-03-20 ynovikov@chromium.org Skip flaky SwANGLE end2end tests.
2020-03-20 geofflang@chromium.org Skip ExternalWrapTest on Ozone.
2020-03-20 m.maiya@samsung.com Vulkan: Implement EXT_shader_non_constant_global_initializers
2020-03-20 geofflang@chromium.org Implement gl[Get]MemoryObjectParameterivEXT
2020-03-20 geofflang@chromium.org Update conditions for exposing ASTC extensions.
2020-03-20 geofflang@chromium.org Remove GL_CHROMIUM_path_rendering
2020-03-20 geofflang@google.com Android.bp: Ignore unknown warning flags.
2020-03-20 sugoi@google.com ASTC: LDR support doesn't imply HDR support
2020-03-20 thakis@chromium.org Suppress two -Wunreachable-code warnings on Fuchsia in Angle.
2020-03-20 jmadill@chromium.org Vulkan: Fix Framebuffer cache depth/stencil issue.
2020-03-20 jmadill@chromium.org Add optimized rendering feedback loop tracking.
2020-03-20 cnorthrop@google.com Perf: Limit TracePerfTest to single compressed TRex
2020-03-20 m.maiya@samsung.com Add support for EXT_EGL_image_external_wrap_modes
2020-03-20 jmadill@chromium.org Remove util.gni.
2020-03-20 jmadill@chromium.org Revert "Refactor BitCount"
2020-03-20 xiaoxuan.liu@arm.com Skip updating viewport and scissor info if the same
2020-03-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 18d3896a15fc..60104cd97446 (2 commits)
2020-03-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader bc98fbeec99b..1c9f24263e6c (2 commits)
2020-03-20 ynovikov@chromium.org Skip SwANGLE GLES31 tests which crash with 32-bit Subzero only on Windows
2020-03-20 ynovikov@chromium.org Skip flaky TransformFeedbackTest.MultiContext on Win Intel Vulkan
2020-03-19 jmadill@chromium.org Track if a Texture is bound as a sampler.
2020-03-19 lexa.knyazev@gmail.com Refactor BitCount
2020-03-19 m.maiya@samsung.com Vulkan: Use device local memory for conversion buffers that can be converted with the GPU
2020-03-19 jmadill@chromium.org Vulkan: Remove public FramebufferVk::getFramebuffer.
2020-03-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 25ede1ced679..18d3896a15fc (2 commits)
2020-03-19 jian.li@arm.com Skip some tests on Mali because of a known issue
2020-03-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 440fc9959f06..bc98fbeec99b (3 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@cb7e7387e61f

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 egdaniel@google.com,brianosman@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-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
Bug: None
Tbr: egdaniel@google.com,brianosman@google.com
Change-Id: Ief63774430fcd8ee16825af5fc2ed642bb0de78e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278409
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-22 00:12:41 +00:00
Mike Reed
862818b291 add --skvm and '!' to viewer to toggle using skvm blitters
Change-Id: I71b81e89a871d9bd96534f1fb8b88fe25045685c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278417
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-21 19:31:11 +00:00
Mike Reed
bd1db41bd8 Add gm to test HSL modes, esp. with src-alpha
Note: the results (esp. Saturation) don't exactly match the reference
images in the W3 spec. However, if I tell viewer to be in P3 colorspace,
then the gm looks (nearly) identical to florin's codepen (when viewed
on a P3 iMac).

Change-Id: Iecf21b3078f079eb30af59d697b97b64091c585c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278416
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-21 18:10:11 +00:00
Brian Osman
7e9d6f43c1 In GrDrawVerticesOp, don't allow CPU xform with perspective matrices
This causes the other attributes (colors and local coords) to be
interpolated incorrectly.

Bug: skia:10069
Change-Id: I90e926bed564f9c39375ba1ce0c27073f97a0875
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278320
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-21 18:09:21 +00:00
Mike Reed
cf3594b603 Finish implementing blendmodes for skvm
Lifted directly from SkRasterPipeline_opts.h, transcribing into skvm.

Change-Id: I777b5d86f11e571b8d7faff38a6e5b0e3c9cc6a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278376
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-21 17:22:01 +00:00
Brian Osman
e41fa2d5e4 Add vertices_perspective GM to demonstrate skbug/10069
Bug: skia:10069
Change-Id: I08814be483a630b0583347793e96ac628fe77bc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278316
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-20 20:30:30 +00:00
Mike Reed
e965438b8e implement more blendmodes for skvm
Change-Id: Ib7286235249f9b4027c1c59c9fae268a9dffefcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278096
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-20 19:59:30 +00:00