Commit Graph

54656 Commits

Author SHA1 Message Date
Herb Derby
3c1ed9cbe2 add bounds generation code to SkGlyphRun
Change-Id: I29c269bce86cb50fea57d44d7760b60326aa56a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396436
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-04-14 18:05:18 +00:00
skia-autoroll
ec745c1818 Roll ANGLE from 68f1203d29c9 to 9e1ccb240f59 (9 revisions)
68f1203d29..9e1ccb240f

2021-04-14 jplate@google.com Workaround for missing include in OpenCL headers
2021-04-14 gert.wollny@collabora.com Capture: Fix storing strings instead of scalars
2021-04-14 syoussefi@chromium.org Revert "Roll vulkan-deps from c18d8cd5016c to a441440ae454 (23 revisions)"
2021-04-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from c18d8cd5016c to a441440ae454 (23 revisions)
2021-04-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 77edad299907 to f32791f5d53b (3 revisions)
2021-04-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from cb430282a083 to 21426fd08f99 (209 revisions)
2021-04-14 cnorthrop@google.com Capture/Replay: Support non-binary GLboolean
2021-04-14 cnorthrop@google.com Capture/Replay: Support glGetQueryiv
2021-04-14 cnorthrop@google.com Capture/Replay: Support glBufferStorageEXT

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 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/+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;skia/skia.primary:Build-Win-Clang-arm64-Debug-ANGLE
Tbr: brianosman@google.com
Test: Test: MEC for Dota Underlords
Change-Id: I263c528d83b301cd0a1a0bb346942eb118b0304d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396700
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-14 17:49:28 +00:00
skia-autoroll
e264ba393d Roll skcms from 411e27776f5c to 163066c2a041 (1 revision)
https://skia.googlesource.com/skcms.git/+log/411e27776f5c..163066c2a041

2021-04-14 mtklein@google.com B2A part 3, turn it on

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

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Tbr: brianosman@google.com,mtklein@google.com
Change-Id: I629f77a5d49673edef2b1a67318fbcc45ac89225
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396720
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-14 17:17:58 +00:00
Brian Osman
cdee120180 Cache runtime color filter alpha-unchanged flag on the effect
This reuses the work we're already doing to compute the one-at-a-time
program, and lets us share the result across color filter instances
created from the same effect.

When we added caching of the flag to filter creation, pinpoint found a
performance regression. I expect this to resolve that.

Bug: chromium:1187432
Change-Id: Ie4f8551fa432d298ce950cba8642b9de28f19b81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396758
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-04-14 14:35:28 +00:00
Dominik Röttsches
343c15a8f7 Additional trace events for SVG parse and render operations
Helpful for analyzing SVG parsing vs. rendering time.

Bug: skia:11851
Change-Id: I64e7002de1846e9c426d59382611e6b0902ada09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396776
Commit-Queue: Dominik Röttsches <drott@google.com>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-14 14:25:28 +00:00
John Stiles
0a0a50ae97 Use .dsl.cpp suffix for DSL C++ instead of _dsl.cpp.
This requires the GN processing to be slightly more complex, as GN has
no native support for more than one extension on a file.
Context: https://groups.google.com/a/chromium.org/g/gn-dev/c/RdEpjeYtb-4

Change-Id: I630511fca9eb291f0e414481ef439f18a8e1b72f
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396197
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-04-14 13:49:53 +00:00
Dominik Röttsches
4df814c2d6 [COLRv1] Special case a sequence of PaintGlyph + solid/gradient fill
In leaf ends of the COLRv1 DAG, if we encounter a PaintGlyph followed
by PaintSolid or Paint*Gradient, we can use the faster drawPath()
operation rather than the combination of clipPath() + drawPaint().

Special case this sequence in the code to optimize performance.

This improves average COLRv1 glyph drawing performance and makes it
faster than an identical set of SVG glyphs when running the
benchmark from [1] because it removes the clipPath() + drawPaint()
slowdown.

https://skia-review.googlesource.com/c/skia/+/395616.

Fixed: skia:11851
Change-Id: Id7037d40a6326d4792f04c5cc1245601d3706c78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396237
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-04-14 13:45:08 +00:00
Mike Reed
e0f3d612b0 Change GlyphIDArray to 16bit
pre-cl to prepare for more Glyph methods
e.g. https://skia-review.googlesource.com/c/skia/+/396496

Change-Id: I334f9d93ea2183a69f2d9087a783ad7d7277248b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396498
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-04-14 13:44:48 +00:00
skia-autoroll
93cb72eefe Roll SK Tool from e08f5bc2712e to 182db4e6cd1b
https://skia.googlesource.com/buildbot.git/+log/e08f5bc2712e..182db4e6cd1b

2021-04-14 borenet@google.com [cipd] Add Client.Create, use in build_and_deploy_cipd

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
Please CC jcgregorio@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

Tbr: jcgregorio@google.com
Change-Id: I64e33f35c466384da4cf50d5448cab98f7507f74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396696
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-14 13:05:48 +00:00
Dominik Röttsches
f37b23d2ef Extract configuring SkPaint from FreeType COLRv1 Paint info
Preparation for special casing the PaintGlyph + solid or
gradient fill case.

No functional changes.

Bug: skia:11851
Change-Id: I689444fb7178bcc9dc91fbb97454d21bf77eb064
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396236
Commit-Queue: Dominik Röttsches <drott@google.com>
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-04-14 07:44:08 +00:00
skia-autoroll
11b6b59188 Roll Chromium from f9ddd1cf5caa to 576abd334c74 (487 revisions)
f9ddd1cf5c..576abd334c

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 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/+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: brianosman@google.com
Change-Id: I6ce8cb63b602aa241683026b0b2914236f5ba4e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396616
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-14 06:02:48 +00:00
skia-autoroll
ff5b669802 Roll ANGLE from 15f4925ac3a6 to 68f1203d29c9 (27 revisions)
15f4925ac3..68f1203d29

2021-04-14 jmadill@chromium.org Disable location tags in test isolates.
2021-04-14 ianelliott@google.com Don't call {begin|end}DebugUtilsLabelEXT() when not enabled
2021-04-14 jmadill@chromium.org Add gclient variable to checkout traces.
2021-04-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from ab36e1e42f00 to cb430282a083 (277 revisions)
2021-04-13 jmadill@chromium.org infra: Remove unused debug/cpu properties from tests.
2021-04-13 gert.wollny@collabora.com FrameCapture: write the float values with high precision
2021-04-13 jonahr@google.com GL: Workaround to sanitize amdgpu renderer strings.
2021-04-13 ynovikov@chromium.org Remove obsolete Linux, Ozone and Fuchsia bots from CQ
2021-04-13 jplate@google.com Migrate CL entry points to libGLESv2
2021-04-13 m.maiya@samsung.com Vulkan: Fix a validation bug in glBeginTransformFeedback
2021-04-13 jmadill@chromium.org infra: Add angle_mb_config.pyl.
2021-04-13 jmadill@chromium.org infra: Move and check gn_isolate_map.
2021-04-13 syoussefi@chromium.org Vulkan: Remove special output of structs and keep them in AST
2021-04-13 geofflang@google.com GL: Support VAOs without native VAOs.
2021-04-13 geofflang@google.com Add the jdk dep when building standalone for Android.
2021-04-13 geofflang@google.com Reland "Vulkan: Add features to modify sampling parameters"
2021-04-13 syoussefi@chromium.org Translator: Track nameless interface block field indices in type
2021-04-13 syoussefi@chromium.org Vulkan: Use AST transformation for gathering default uniforms
2021-04-13 gert.wollny@collabora.com Capture/Replay: Serialize only a hash of the shader binary
2021-04-13 gert.wollny@collabora.com JsonSerializer: add method to store only a hash for vectors
2021-04-13 syoussefi@chromium.org Translator: Validate consistent variable references
2021-04-13 gert.wollny@collabora.com JsonSerializer: Fix rapidjson define usage
2021-04-13 gert.wollny@collabora.com Capture/Replay: Print context diff on failure when verbose
2021-04-13 cheryl.wei@arm.com Skip IOBlocksSeparate xfb test on Linux/ARM/Vulkan
2021-04-13 jplate@google.com Generate CL stubs in libGLESv2
2021-04-13 gert.wollny@collabora.com Capture/Replay: write context serializations on failure
2021-04-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 497fa2f8d899 to ab36e1e42f00 (427 revisions)

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 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/+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: brianosman@google.com
Test: Test: ProgramPipelineXFBTest31.VaryingIOBlockSeparableProgramWithXFB*
Change-Id: I7268c1aa03e362b844b65702315f8d37a9fe477a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396617
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-14 05:01:48 +00:00
skia-autoroll
891500f9bc Roll SwiftShader from 77edad299907 to b71a5569b879 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/77edad299907..b71a5569b879

2021-04-13 srisser@google.com Implement depthBoundsTest
2021-04-13 capn@google.com Eliminate the OpenGL ES 1.1 implementation

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 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/+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: brianosman@google.com
Change-Id: I92c8cc9d8f2e491d3a3db732780ad0bfbb60eefb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396537
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-14 04:53:28 +00:00
skia-autoroll
9ef95bad46 Roll Dawn from e19004566464 to f7d01e07cd84 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/e19004566464..f7d01e07cd84

2021-04-13 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c3bbb4d079e4 to ebc5bd4e28ea (3 revisions)
2021-04-13 shrekshao@google.com Remap BindGroup bindingIndex for vulkan backend when using Tint Generator
2021-04-13 jrprice@google.com Update examples for recent WGSL changes
2021-04-13 senorblanco@chromium.org OpenGL: DoTexSubImage() cleanup.
2021-04-13 senorblanco@chromium.org OpenGL: refactor all texture uploads.
2021-04-13 cwallez@chromium.org Remove usage of deprecated WGSL IO in perf/unit/whitebox tests
2021-04-13 cwallez@chromium.org Remove deprecated WGSL "-> void"
2021-04-13 yunchao.he@intel.com Fix a bug about depth/stencil formats validation

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from c3bbb4d079e4 to ebc5bd4e28ea

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 alanbaker@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: alanbaker@google.com
Change-Id: I37f9a39634f36cc068bb41b44480e350cb7cf843
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396538
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-14 04:53:18 +00:00
John Stiles
82ab3409f7 Fork CPPCodeGenerator into a DSL-based version.
The long term goal is for the DSLCPPCodeGenerator to replace the
CPPCodeGenerator entirely, but we will need both to coexist while DSL is
still under development.

Currently, the DSLCPPCodeGenerator is cloned from CPPCodeGenerator and
emits almost exactly the same code (it adds a comment at the top to
distinguish its output). Its output will change in followup CLs.

This CL also allows skslc to recognize the `_dsl.cpp` output suffix and
generate code using DSLCPPCodeGenerator instead of CPPCodeGenerator.
This allows test DSL FPs to be created for inspection.

Change-Id: If5136279c307ea53a9df3a292caa18344c1eb259
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396096
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-13 22:01:09 +00:00
Brian Osman
577c6067a1 Runtime effects: Support input color as a parameter to main()
For now, just bolt this onto the existing runtime effects. The next step
is to add dedicated modes to the compiler for shader vs. color filter.
Once we get there, we will be much more strict about main signature in
each mode (and start adding other per-mode error checking).

Bug: skia:11813
Change-Id: I27e27600209e9844ae107364baea2fb949b47c3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395838
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-04-13 21:55:18 +00:00
Brian Salomon
785a3262d1 Don't elide GrMatrixEffect if matrix is identity.
This ensures an effect setup code path that calls GrMatrix::Make()
doesn't produce an identity and non-identity shader variant.

Change-Id: I4d17395ed1b5bfd2bf9ceac68e85756c18eb2d2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396018
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 20:28:07 +00:00
Brian Osman
8ed8081e0c GrSkSLFP no longer needs a GrContext
Change-Id: Iee1ea7ee2d545138a8243c373f7a163f7120548d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396337
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-13 20:00:27 +00:00
Dominik Röttsches
ac04d95061 Factor out COLRv1 transforms to separate function
Preparation for optimizing the case of PaintGlyph + PaintSolid /
PaintGradient so that the remainder of the colrv1_draw_paint() function
can be turned into configuring an SkPaint.

Perform canvas CTM concatenation at the end of the function instead of
in each individual case as before.

No functional changes.

Bug: 11851
Change-Id: I04a77134d406f1625efebd5f623cfdbcca19b7cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396036
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-04-13 19:59:07 +00:00
Brian Osman
debcbbf6a8 Flip the arguments to sample() when passing both coords and a color
A subset of these signatures will be available to public SkSL, and
structured in a way that really pushes the coords as the primary
argument (and color as an optional one). In any case, I find this
ordering more natural.

Change-Id: I7b3bc962c5b305b9eeed1ae11ae1dc2ce7269364
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396021
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-13 19:06:07 +00:00
Brian Salomon
4bbb29070c Concatenate matrices when GrMatrixEffect wraps another GrMatrixEffect
Bug: skia:11844
Change-Id: I13165fb17b06371854a4911c5d91bf2415d4df2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396017
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 19:04:47 +00:00
Albert Chaulk
52b9e815eb Rework gaussian blur to take advantage of GPU sampling.
The GPU will provide a linear mix of two texels as part of sampling.
We do have to change sampling from nearest to linear, but cutting the number
of texture lookups in half should more than make up for that - texture
fetches tend to be slow operations and the hardware has been optimized for
linear texture fetches.

Bug: skia:11796
Change-Id: Id6fc3e3cdd2491c841b31fe97ca718d6916f27be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390796
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 18:17:07 +00:00
Brian Salomon
71283238d1 Reland "Remove code to push pixmaps to backend textures from GrGpu classes"
This is a reland of 45889d1269

Original change's description:
> Remove code to push pixmaps to backend textures from GrGpu classes
>
> Replace GrGpu::updateBackendTexture with narrower method that clears
> a backend texture.
>
> Creation of data for a solid color compressed texture is lifted up to
> GrDirectContext and goes through updateCompressedBackendTexture.
>
> Bug: skia:11786
> Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:11786
Change-Id: Ibf85794a33e68acb17f0fb704f6815cd6460b3f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396098
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 17:35:37 +00:00
Chris Dalton
2517ce39ca Add usesMSAASurface to GrMeshDrawOp::Target
Also switches GrFillRRectOp to call usesMSAASurface.

Bug: skia:11396
Change-Id: I66d0ee2c6dc76819efc0f3283f6e1a0af11f23f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395136
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-13 16:50:00 +00:00
Brian Salomon
34012d7eee Revert "Remove code to push pixmaps to backend textures from GrGpu classes"
This reverts commit 45889d1269.

Reason for revert: compressed texture assertion on D3D bot

Original change's description:
> Remove code to push pixmaps to backend textures from GrGpu classes
>
> Replace GrGpu::updateBackendTexture with narrower method that clears
> a backend texture.
>
> Creation of data for a solid color compressed texture is lifted up to
> GrDirectContext and goes through updateCompressedBackendTexture.
>
> Bug: skia:11786
> Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie58f52245c44c77f09742b0cb590cc97b97e6e37
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11786
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396097
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 16:17:42 +00:00
John Stiles
3738ef531b Move code generators to codegen/ directory.
We are up to having seven distinct types of codegen, and will soon have
an 8th (DSL C++).

Change-Id: I6758328390c234ba1d5c30c118199dbc820af52a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395817
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-04-13 15:34:24 +00:00
Chris Dalton
da2b0f43a2 Move the decision for useMSAASurface to GrOpsTask
Bug: skia:11396
Change-Id: Ic0f7b2b43c7c383381b2447385019d50660eb53c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393777
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-13 15:31:14 +00:00
Florin Malita
8bad8f76c3 [androidkit] Register native methods explicitly
Use RegisterNatives() to bind native methods, instead of relying on
dynamic linker naming conventions.

Change-Id: I602f2efe73e3b9c3c7dfaf7af2307dcfb4cd935e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396016
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-13 15:29:19 +00:00
John Stiles
7134646ebd Migrate SkSLExternalFunction to the ir/ directory.
Change-Id: I8ca4fbba551624c61a4ebe7a4716750fe0b48196
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395818
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>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-13 14:17:16 +00:00
Jim Van Verth
3473b4e724 Rename D3D descriptor methods to be clearer
Change-Id: I047c4397fba87ce5db6f422162f942ac0ca0b0b9
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395816
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-04-13 14:04:04 +00:00
Florin Malita
2a650cc795 [androidkit] Split Canvas backing store into Surface
Add a Surface abstraction to manage the canvas backing store (equivalent
to SkSurface).

This allows relieving Canvas of buffer management duties - we can now
focus solely on rendering APIs at this level.

At the moment, only a Bitmap-backed surface is implemented -- but other
native surface types will be added.

Also relocate native code to 'src'.

Change-Id: I46738472536cf24524428dbd36969f2b99d251e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395536
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-04-13 13:56:04 +00:00
Brian Salomon
45889d1269 Remove code to push pixmaps to backend textures from GrGpu classes
Replace GrGpu::updateBackendTexture with narrower method that clears
a backend texture.

Creation of data for a solid color compressed texture is lifted up to
GrDirectContext and goes through updateCompressedBackendTexture.

Bug: skia:11786
Change-Id: I1d617623df5e65686f30e57c361a64f78d77f7bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392836
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-13 13:32:44 +00:00
John Stiles
04d4969bd2 Fix apparent typo for 0-component swizzles.
Noticed during code read-through; unaware of any actual issues caused by
this.

Change-Id: I455e7fbc3a1d83f6319aaed1518d382ec231c8be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395836
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-04-13 13:20:54 +00:00
skia-autoroll
be8db7845b Roll Dawn from edb79bafba1f to e19004566464 (11 revisions)
https://dawn.googlesource.com/dawn.git/+log/edb79bafba1f..e19004566464

2021-04-13 cwallez@chromium.org dawn_wire: Add support for injecting/reserving swapchains
2021-04-12 senorblanco@chromium.org OpenGL: Refactor texture uploads.
2021-04-12 bclayton@google.com Reenable D3D12 tests that failed with TINT_UNIMPLEMENTED
2021-04-12 bclayton@google.com Reenable D3D12 tests that failed with 'tint_first_vertex_index not found'
2021-04-12 bclayton@google.com Reenable D3D12 tests that failed with 'unsupported struct member decoration'
2021-04-12 bclayton@google.com Reenable D3D12 tests that failed with 'runtime array not supported yet'
2021-04-12 bclayton@google.com Reenable D3D12 texture tests with tint generator
2021-04-12 bclayton@google.com Reenable D3D12 test OpArrayLengthTest with tint generator
2021-04-12 bclayton@google.com Reenable D3D12 test TwoComputeInModule with tint generator
2021-04-12 bclayton@google.com Reenable D3D12 tests that use workgroup storage
2021-04-12 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c8ffbe43a7b3 to c3bbb4d079e4 (1 revision)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from c8ffbe43a7b3 to c3bbb4d079e4

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 alanbaker@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: alanbaker@google.com
Change-Id: Ia0b5abd740ab4f76e10569f791ae4e594007e7ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395936
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-13 05:02:24 +00:00
skia-autoroll
aa6cf3f4b8 Roll ANGLE from f92eb43ce917 to 15f4925ac3a6 (10 revisions)
f92eb43ce9..15f4925ac3

2021-04-13 nicolascapens@google.com Restore EGL_EXT_buffer_age for SwiftShader Vulkan
2021-04-13 syoussefi@chromium.org Vulkan: More perf warning for vertex format conversion
2021-04-12 doughorn@google.com Reland "Fix multithreaded crash on draw commands on D3D11 backend."
2021-04-12 sunnyps@chromium.org Ignore internal format attribute for YUV D3D11 EGLImages
2021-04-12 syoussefi@chromium.org Remove EvqBaseVertex and EvqBaseInstance qualifiers
2021-04-12 stevensd@chromium.org Ignore subclass when finding GPU PCI devices
2021-04-12 jmadill@chromium.org infra: Remove named vs_toolchain cache.
2021-04-12 jmadill@chromium.org DEPS: Include a pinned version of depot_tools.
2021-04-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 4c0f888d7ef8 to 77edad299907 (1 revision)
2021-04-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 920c6c5ffe65 to 497fa2f8d899 (507 revisions)

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 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/+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: brianosman@google.com
Change-Id: Idb39e313dd004dee1fd4b0d14d7d4b0c75bda30e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395787
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-13 04:57:04 +00:00
skia-autoroll
3627aff89c Roll Chromium from 5368f81b40a5 to f9ddd1cf5caa (949 revisions)
5368f81b40..f9ddd1cf5c

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 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/+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: brianosman@google.com
Change-Id: I3527df913522e7e466f5d49070f3cc1071c50e9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395786
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-13 04:45:24 +00:00
Mike Reed
e58231ae8f Removed unused SkInterpolator
Bug: skia:11852
Change-Id: I7a9eb2e0594bc1bdf6e7ba5355b6f00cc177253f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395476
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-04-13 00:50:11 +00:00
John Stiles
06203df0e4 Replace three mix() calls with one swizzled mix().
Not a big deal, just a tiny simplification.

Change-Id: I34e1404d79e22449f19a22ccf2cf6ffd98acf879
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395727
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-04-12 22:18:01 +00:00
Ethan Nicholas
8455893840 SkSL DSL matrix support
Change-Id: I9d43346df1a7611726f69ea54b4236e32d11d20c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395696
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-12 22:03:31 +00:00
Chris Dalton
b0fed1dc21 Move the decision for useMultisampleFBO to GrGLOpsRenderPass
Bug: skia:11396
Change-Id: I5548784d735a11a8ca7afc7eb5a731966ec1a0b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393776
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-12 21:44:21 +00:00
Brian Salomon
56892dc933 Favor GrRRectFillOp in reduced shader mode.
Bug: skia:11844
Change-Id: I959966d9c2366c249bbdb3b78d47d0e29e9e43f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395719
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-12 21:01:51 +00:00
skia-autoroll
d276cdfdee Roll SK Tool from 79153d607903 to 7b892cc5882d
https://skia.googlesource.com/buildbot.git/+log/79153d607903..7b892cc5882d

2021-04-12 borenet@google.com [sk] Add release-branch subcommand

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
Please CC jcgregorio@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

Tbr: jcgregorio@google.com
Change-Id: Ib0a487ed3fc2455c2f15713751c8f80e7a77c85e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395778
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-12 20:10:51 +00:00
Brian Osman
962e6140ac Add ivec GLSL type aliases to runtime effects
Also add unit test of all GLSL type aliases.

Bug: skia:10679
Change-Id: I93e21621c11adfe3f114d0c55fb8043518e62696
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395718
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-12 16:55:41 +00:00
Brian Salomon
e9f22657c3 Make reducedShaderMode a shader cap
Allows GrProcessors to change behavior based on cap.

Bug: skia:11844
Change-Id: I4378c47c50a9bf33fa7461c6b9c522413e932bcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395717
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-04-12 16:55:01 +00:00
John Stiles
d02615698e Fix assertion when performing type-coercion with enums.
In http://review.skia.org/393397, I replaced a Constructor::Convert call
with a call directly to ConstructorCompoundCast::Make.

This worked fine if the input expression was actually a compound, but
if it was not, the code would assert/crash. The fuzzer detected this
error right away. (Enums are not considered to be a scalar, a vector or
a matrix in SkSL.)

Change-Id: Ie0df4c5771ff4f4d8f5251d4703e9c3516b6baad
Bug: oss-fuzz:33113
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395720
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>
2021-04-12 16:40:31 +00:00
Dominik Röttsches
e14d72500f Avoid unnecessary saveLayer() in COLRv1 paint operations
Most of the COLRv1 paint operations only need the clip and matrix to be
kept on SkCanvas, only PaintComposite needs a full saveLayer().
Adjust calls accordingly.

Bug: skia:11851
Change-Id: I85b3c27495c78306457e17fea8062c957e2f3b05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395617
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-04-12 16:06:11 +00:00
Ethan Nicholas
ee49efcc91 Added DSL fragmentProcessor and Sample function
Change-Id: I76348d151fbf27454a6f60e4f5f7e1774731e61b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395216
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-04-12 14:29:51 +00:00
John Stiles
67e52cf47d Remove last vestiges of u_skRTWidth.
This was not used anywhere. (u_skRTHeight, on the other hand, is used to
support Y-flipped surfaces.)

Change-Id: I0cb803e8f82834715a47366a00c8ec913ee3c6e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394898
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 14:15:01 +00:00
John Stiles
cc6492ba9c Detect version breaks in the persistent cache at compile time.
The persistent cache stores the struct `SkSL::Program::Inputs` on disk
as a binary blob. If the struct changes size or shape in any way, this
causes a compatibility break in the cache files and we need to increment
kCurrentVersion to invalidate them. We will now automatically detect any
change to Inputs which causes its size to differ and static_assert.

Change-Id: Ie8b9958029c209f2c763f5bea78fcaa8bc3444d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394897
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 14:11:59 +00:00
John Stiles
f2c2d3020e Migrate PersistentCacheUtils logic into a cpp file.
This code is not performance-sensitive, and there doesn't seem to be any
benefit to making it header-only.

Change-Id: Ic83be5cbb96f08c18a144954be7453aaabaa5a72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394900
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-12 14:09:59 +00:00