Commit Graph

53410 Commits

Author SHA1 Message Date
Tyler Denniston
4c0a35f9d6 Improve conic Wang's formula correctness tests
- Treat randomly generated control points as pre-projected
- Use double-precision conic evaluation for "within tolerance" test.
  This allows us to test with larger magnitude control points (the
  SkConic/SkGeometry single-precision functions lose too much accuracy).

Bug: skia:10419
Change-Id: Iba0915dccb50131e1a1b28a7d556863497f636e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367057
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-02-08 17:49:24 +00:00
Chris Dalton
c740d93628 Lift stroke cusp detection out of GPU shaders
Cusps are rare, and simply detecting if a curve has one or not is
cheap. This CL handles cusps on the CPU side by chopping them into two
different patches joined by a bowtie. By removing cusps on the GPU
side, we greatly reduce the amount of complexity required in the
tessellation shaders. For now we only remove the line detection in
order to fix a rendering artifact, but in the future we will be able
to significantly simplifty these shaders.

Bug: chromium:1172543
Bug: skia:10419
Change-Id: I9c27c3cf002e0cbd91d4877f0ce7ec5a9136ef2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367018
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-08 17:10:04 +00:00
Adlai Holler
a3987cc587 Remove deferred proxy machinery
These aren't used any more in favor of lazy proxies.

Bug: skia:11288
Change-Id: I992e1a3dd343e0ebc7f3a4f18c0054453dfebbaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366896
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-02-08 16:23:04 +00:00
John Stiles
a793f4f6fc Add additional cases to folding tests.
These cover new ground; when combined with some additional optimization
work, they can cause crashes in the optimizer that we don't see from any
existing test.

Change-Id: I3958a5522cfe0929d0753e6e617d72e032c7f5a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367063
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-08 16:17:18 +00:00
John Stiles
c2c1b0c460 Migrate some SkSL swizzle tests to dm.
Change-Id: I2bd6bf9c368359a2b21861c1b6f621040d335111
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367056
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-08 16:16:28 +00:00
skia-autoroll
75b7606c0f Roll Chromium from e94d2f0da382 to 3842e9ea8162 (629 revisions)
e94d2f0da3..3842e9ea81

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 borenet@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: borenet@google.com
Change-Id: Id8e79958a8f5d26798a83dfbde1caf21dbbc14e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367639
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-08 06:20:33 +00:00
skia-autoroll
e1963835d0 Roll ANGLE from b2de0688d7c9 to 6b20e1c88488 (9 revisions)
b2de0688d7..6b20e1c884

2021-02-08 cnorthrop@google.com Tests: Add Hill Climb Racing trace
2021-02-08 cnorthrop@google.com Tests: Add Worms Zone io trace
2021-02-07 doughorn@google.com Micro-optimizations for setUniform*
2021-02-06 natsu@google.com Use __system_property* to read Android props
2021-02-05 cnorthrop@google.com Tests: Add Romancing Saga trace
2021-02-05 geofflang@chromium.org Skip happy_color trace on Windows AMD Vulkan
2021-02-05 ianelliott@google.com Create MSAA-swapchain windows' VkImages differently
2021-02-05 cnorthrop@google.com Tests: Add Rise of Kingdoms trace
2021-02-05 cnorthrop@google.com Tests: Add Clash Royale trace

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 borenet@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: borenet@google.com
Test: Test: Run the dEQP shader tests.Test: Test: angle_perftests --gtest_filter="*clash_royale*"Test: Test: angle_perftests --gtest_filter="*hill_climb_racing*"Test: Test: angle_perftests --gtest_filter="*rise_of_kingdoms*"Test: Test: angle_perftests --gtest_filter="*romancing_saga*"Test: Test: angle_perftests --gtest_filter="*worms_zone_io*"Test: Test: aosp/1574848 presubmitTest: Test: roll_aosp.sh && m && launch Cuttlefish w/ SwANGLE
Change-Id: I2ac7b4deec28f1f6ec6c00868b66cdaaaead9d32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367636
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-08 06:12:03 +00:00
skia-autoroll
e19b41eb77 Roll SwiftShader from ff010f9f0131 to 266614a36dbd (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/ff010f9f0131..266614a36dbd

2021-02-05 amaiorano@google.com Fix crash during llvm_shutdown due to init order fiasco
2021-02-05 capn@google.com Reactor: fix using -x86-asm-syntax only on x86 compilations

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 borenet@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: borenet@google.com
Change-Id: I470ca9ad086db05d2d13e78a3fda77f038631f33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367638
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-08 06:07:23 +00:00
skia-autoroll
7c6e77087f Roll Dawn from 2b9707d3369a to 2831f0584028 (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/2b9707d3369a..2831f0584028

2021-02-06 bryan.bernhart@intel.com D3D12: Log warning if missing SDK layers
2021-02-05 enga@chromium.org Remove deprecated Wire APIs
2021-02-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 1f2d38c826ce to a2fa690cda46 (1 revision)
2021-02-05 enga@chromium.org Nuke the ClientMatches hack for same-device validation
2021-02-05 cwallez@chromium.org Remove utils::GetDefaultSamplerDescriptor
2021-02-05 bryan.bernhart@intel.com D3D12: Support per plane views with NV12 textures
2021-02-05 cwallez@chromium.org Rolling 3 dependencies

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 1f2d38c826ce to a2fa690cda46

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 cwallez@google.com,kainino@google.com,enga@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: cwallez@google.com,kainino@google.com,enga@google.com
Change-Id: If972dee1caf87eb9d4cd93c56ff09df57f143667
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367637
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-08 05:36:24 +00:00
Mike Reed
1d62221553 Hide (unused) SkDrawLooper
Bug: skia:8672
Change-Id: Ib8b614d94925b3cc7d02be422dbb7e96ea4c26b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366338
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-02-07 12:49:53 +00:00
skia-recreate-skps
5b67a809c0 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I80ba69703cbeacbd8d421a326a49011b2762b3df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367476
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2021-02-07 10:37:23 +00:00
Mike Klein
827f8c0103 support skvm fallback for single color filtering
with unit test

Change-Id: I7f0e30435bf4e054fe7436daaadb3512936a58ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367237
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-06 19:04:22 +00:00
Brian Osman
236ddb3e1d Detach pipeline-stage generator from SkSL compiler
This is now structured like the VM generator: Just a function that does
the conversion. Moved all relevant types and constants out of the
compiler, too. The key thing is that we don't need/want an error
handler, because it's too late to fail. We *must* catch all errors
during IR generation.

This is also another step along the path of directly emitting to the
fragment shader builder, rather than generating strings with
placeholders.

Bug: skia:11127
Change-Id: I18591270aa6e56dae1f040275a4b7d4a245007db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366956
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-06 16:25:32 +00:00
Brian Osman
001850105e Create SkSLOperators, centralize functionality
Change-Id: I3593e7ab0caac2fd572346038cbc8ff63e6fe970
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366406
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-06 16:24:12 +00:00
Chris Dalton
9c00b794a7 Don't request mixed samples unless we can have >1 stencil sample
Change-Id: I95d9055b20ba9c1ca4b8336c98a4cd134aa2aa80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367077
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-06 06:20:26 +00:00
Greg Daniel
393debc430 Revert "Switch vulkan transfer buffers to new buffer class."
This reverts commit 2d4c32987a.

Reason for revert: maybe breaking chrome roll?

Original change's description:
> Switch vulkan transfer buffers to new buffer class.
>
> Bug: skia:11226
> Change-Id: I58fc7e02dc9ea9a06e855107aad4fbbd7b98d347
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366316
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I7de37315a10c2cd9148003643d9543e883c17053
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11226
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367065
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-06 03:37:29 +00:00
Ethan Nicholas
c0f9815609 Added detection for non-constant-folded divide by zero errors in
SkSL.

It would previously catch 1 / 0, but fail to detect x / 0.

Bug: skia:11051
Change-Id: I3adb5942cce03a7ad40a13a8ca5d5a7f2029d6ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366720
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
2021-02-06 03:13:16 +00:00
Robert Phillips
42084c74f5 Update Skia Gardener Docs
Change-Id: Ia7332af1f54fa3579ed7bc21bb8db742ee6f1ebf
No-Try: true
Docs-Preview: https://skia.org/?cl=366978
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366978
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2021-02-05 21:12:56 +00:00
Ethan Nicholas
daceb79b3a SkSL DSL break / continue / discard
Change-Id: Ifa5fa8bd80ffc48408f133f96951f8a74d572751
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366959
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-05 20:54:37 +00:00
Herb Derby
55f795e696 introduce a subrun linked list
Create a simple linked list to sequence the subruns preparing
the way for a more focused allocator for managing subruns
at the end of the GrTextBlob.

Change-Id: I595e2ce2810d161332a23405e4615724d2953471
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366957
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-02-05 20:48:34 +00:00
Adlai Holler
990a0d8b65 Migrate uses of deferred proxies to lazy proxies
A follow-up CL removes the deferred proxies system entirely.

Bug: skia:11288
Change-Id: Ic5b3ce820ea946f6ae27bd763c0f389caf8863d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366716
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-02-05 20:06:44 +00:00
Greg Daniel
2d4c32987a Switch vulkan transfer buffers to new buffer class.
Bug: skia:11226
Change-Id: I58fc7e02dc9ea9a06e855107aad4fbbd7b98d347
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366316
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-02-05 19:49:34 +00:00
Mike Reed
f3ac2afbb6 Name common cubic resamplers
Useful in client code to document what we're doing as we switch away
from SkFilterQuality.

Change-Id: I05737beb99a567a46a3c3ec418b7f7da71b1ff62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366723
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2021-02-05 19:21:04 +00:00
Brian Osman
ca21e14d77 PipelineStageCodeGenerator no longer derives from GLSL generator
This is largely mechanical, with large chunks of the GLSL generator
functionality removed. There are some obvious further improvements to be
made, but it should be easier starting from here.

Change-Id: I93b1aa1936c4151af83f83e6d03233d89682496d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366402
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-05 17:24:53 +00:00
John Stiles
abc3b78011 Eliminate left-side comma expressions without side effects.
This takes away one of our gadgets for thwarting dead-code elimination
in unit tests, but it's the right thing to do. Comma expression left-
sides without side effects are clearly dead code.

Change-Id: Iaee490b4a742d06a0a0be94cddaa69a51543d8f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366719
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-05 16:50:33 +00:00
skia-autoroll
968098f64d Roll ANGLE from 63e7ab8d636d to b2de0688d7c9 (13 revisions)
63e7ab8d63..b2de0688d7

2021-02-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 14dcbed947ce to ff010f9f0131 (2 revisions)
2021-02-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from f5e138b74576 to 19ae187233a0 (532 revisions)
2021-02-05 cnorthrop@google.com Tests: Add Happy Color trace
2021-02-05 cnorthrop@google.com Tests: Add Sniper 3D trace
2021-02-05 cnorthrop@google.com Tests: Add Coin Master trace
2021-02-05 jmadill@chromium.org Revert "Test Runner: Pick single/multi-process mode automatically."
2021-02-05 cnorthrop@google.com Tests: Add Fallout Shelter Online trace
2021-02-04 sokcevic@google.com Move metadata in OWNERS files to DIR_METADATA files
2021-02-04 jmadill@chromium.org Vulkan: Don't request aliased FB attachments.
2021-02-04 sugoi@google.com Enable packing extensions for the Vulkan backend
2021-02-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 6b006f95bb79 to f5e138b74576 (467 revisions)
2021-02-04 cnorthrop@google.com Tests: Add Shadow Fight 2 trace
2021-02-04 cnorthrop@google.com Tests: Add Hay Day trace

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/+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: robertphillips@google.com
Test: Test: angle_perftest --gtest_filter="*coin_master*"Test: Test: angle_perftest --gtest_filter="*sniper_3d*"Test: Test: angle_perftests --gtest_filter="*fallout_shelter_online*"Test: Test: angle_perftests --gtest_filter="*happy_color*"Test: Test: angle_perftests --gtest_filter="*shadow_fight_2*"Test: Test: angle_perftests --gtest_filters="*hay_day*"
Change-Id: If577bcd6ae5b8bc2597874aaa8905a769a50150c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366816
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-05 16:27:54 +00:00
John Stiles
d437478348 Migrate even more SkSL tests to run in dm.
- ResizeMatrix
- ScalarConversionConstructorsES2
- StackingVectorCasts
- StaticIf
- SwizzleBoolConstants

Non-ES2 compatible tests:

- ResizeMatrixNonsquare
- ScalarConversionConstructorsES3

Newly discovered bugs:
- skia:11278 SPIR-V does not support casting non-square matrices

Change-Id: I7feb78f0380d0a9cb328ec61f96a364ad1281432
Bug: skia:11009, skia:11278
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366408
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-05 16:04:43 +00:00
Tyler Denniston
1f4cd07af8 [svg] Support preserveAspectRatio for images
https://www.w3.org/TR/SVG11/struct.html#ImageElement
https://www.w3.org/TR/SVG11/coords.html#PreserveAspectRatioAttribute

We already had a function to compute the appropriate matrix, and since
we can share the functionality with other elements that establish a new
viewport (including svg, symbol, and a few others), this CL moves the
function to the SVG node base class.

Relevant test for images is struct-image-06.

Bug: skia:10842
Change-Id: I5d6261210d03959e28d0bd7189da7f4ea53abc03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366398
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-02-05 15:59:10 +00:00
John Stiles
3f14d28b59 Add SPIR-V support for doubly-swizzled lvalues.
This fixes the OutParamsTricky test.

Change-Id: If59637bc946b71b141ae1d90cf1652bf80b163c4
Bug: skia:11269
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366399
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-05 15:58:53 +00:00
Ben Wagner
81bc8fe0c5 Less string copies of text in XML parsing.
Change-Id: I5bf80de3da7ae4bd91dd7675a9af16d377c014aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366409
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-02-05 15:36:43 +00:00
Florin Malita
c7d6e0ba0b Normalize perspective in SkImageShader::doStages()
Same as onProgram().

Change-Id: Ie0d72ba50d73e38b4064347a3b0c0bb3300ffc16
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366410
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-02-05 14:17:30 +00:00
Mike Reed
2847d078c5 Undo legacy high-quality hack
Change-Id: I102551cd9cb0854d111d14fd623b39df12c9acf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366537
Reviewed-by: Mike Reed <reed@google.com>
2021-02-05 13:54:45 +00:00
Robert Phillips
03555e92a1 Revert "Don't simplify strokes that could have been tessellated"
This reverts commit 3f95357c4c.

Reason for revert: I believe this is blocking the Chrome roll

Original change's description:
> Don't simplify strokes that could have been tessellated
>
> Bug: chromium:1172543
> Change-Id: I3be0d822ca0a338118059c7aa37b2fd7822869b8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362936
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: Id574d974617423b44d1767d7a478ce39bea810fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1172543
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366717
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-05 13:22:12 +00:00
skia-autoroll
2c6d8d970a Roll SwiftShader from 14dcbed947ce to ff010f9f0131 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/14dcbed947ce..ff010f9f0131

2021-02-05 capn@google.com Limit Subzero routine stack size to 512 KiB
2021-02-05 capn@google.com Limit LLVM routine stack size to 512 KiB

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: robertphillips@google.com
Change-Id: Id4fe3a72e285f4914570fb0a5d6347de080afe6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366562
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-05 06:04:20 +00:00
skia-autoroll
09839148f3 Roll Dawn from d5a0728b67c8 to 2b9707d3369a (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/d5a0728b67c8..2b9707d3369a

2021-02-05 brandon1.jones@intel.com Re-enable Intel D3D12 Validation Tests
2021-02-04 senorblanco@chromium.org Don't call glUniform for Storage Texture on OpenGL ES.
2021-02-04 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from b17aea159c32 to 1f2d38c826ce (13 revisions)
2021-02-04 enga@chromium.org Reject callbacks if the device is destroyed before completion
2021-02-04 brandon1.jones@intel.com Add Backend Validation Levels Option to Dawn Tests
2021-02-04 enga@chromium.org Fix GetMappedRange unittests on the wire
2021-02-04 cwallez@chromium.org Device: Deprecated GetDefaultQueue in favor of ::GetQueue()

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from b17aea159c32 to 1f2d38c826ce

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 cwallez@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: cwallez@google.com
Change-Id: I78c761109539bc388a6fdf2f667859f31e8d41c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366561
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-05 05:46:30 +00:00
skia-autoroll
2a21a21223 Roll Chromium from 782ff20a9dc1 to e94d2f0da382 (512 revisions)
782ff20a9d..e94d2f0da3

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/+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: robertphillips@google.com
Change-Id: Idb6604e8879842db31c40664c99f32b7ff87a7b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366560
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-05 05:29:30 +00:00
Chris Dalton
3f95357c4c Don't simplify strokes that could have been tessellated
Bug: chromium:1172543
Change-Id: I3be0d822ca0a338118059c7aa37b2fd7822869b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362936
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-02-05 03:23:49 +00:00
Brian Salomon
91a88f0715 Keep mapped buffer manager alive until after buffers are disposed of.
There is currently window of time where we have removed the Inbox
that receives messages about buffers that need to be unmapped and
the disposal (abandonment/releasing) by GrDirectContext.

If on another thread an async read result is released it will attempt
to post to the inbox and transfer its buffer ref along with the
posted message. However, the inbox is gone so it unrefs the
buffer and we delete the buffer on that thread instead of in
~GrDirectContext.


Speculative fix for:

Bug: chromium:1153592
Change-Id: I223bcedca624faa159b0f4c6fcb9e45aded64dff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366403
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-05 02:13:39 +00:00
Chris Dalton
9f704a8640 Don't call drawSimpleShape from drawShape
This can wait until drawShapeUsingPathRenderer.

Bug: chromium:1172543
Change-Id: I3217084f89125ee90f67907a2e045394cf8ae839
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366147
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-05 00:55:49 +00:00
Ravi Mistry
52bf4853c1 Add new MotionMark SVG
Bug: skia:11244
Change-Id: Ia8916210bfc85c4818cc96584e603150caaf02d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366404
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-02-05 00:14:19 +00:00
Greg Daniel
f76259e9cb Make sure to unbind xfer buffer before glReadPixels to cpu call.
If follow on change when I try to use cached buffers for read backs we
get into a state where we're doing normal readPixels but we still have
the buffer alive and it is still bound to PIXEL_PACK_BUFFER which causes
INVALID_OPERATION errors.

Bug: skia:11226
Change-Id: If5486cc2743908ee7222925afb372c1cfafef429
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366319
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-02-04 23:36:19 +00:00
John Stiles
b88b4e1a12 Migrate additional SkSL tests to run in dm.
- MultipleAssignments
- NegatedVectorLiteral
- NumberCasts
- OutParams
- OutParamsTricky (disabled on GPU due to skia:11269)

Change-Id: I87dc9c5019931f3d2dc3aafbe1e02d0eee2e1a05
Bug: skia:11009, skia:11269
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366400
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-02-04 22:12:27 +00:00
Chris Dalton
bfe0d37c69 Add a drawSimpleShape method to GrSurfaceDrawContext
Bug: chromium:1172543
Change-Id: I8c5f48cd7744755d5c207c53088912f0aa893369
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366146
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-04 22:06:18 +00:00
Robert Phillips
2c2303ebab Handle possible degenerate case in the hairline path renderer
Bug:1172796
Change-Id: Ifc03709a0f978b4dec6c8f7ea2c721c860167abb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366337
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-02-04 21:41:28 +00:00
Michael Ludwig
7c6abf86f5 Reland "Remove deprecated SkImageFilter::MakeMatrixFilter"
This reverts commit fde740c7f2.

Reason for revert: g3 updated so roll won't be stopped

Original change's description:
> Revert "Remove deprecated SkImageFilter::MakeMatrixFilter"
>
> This reverts commit ed63d4f177.
>
> Reason for revert: Breaking G3 roll?
>
> Original change's description:
> > Remove deprecated SkImageFilter::MakeMatrixFilter
> >
> > The equivalent functionality is available in
> > include/effects/SkImageFilters.h via SkImageFilters::MatrixTransform.
> >
> > Bug: skia:11230
> > Change-Id: I77b78d508d653a32c913a7599f1004ab634e3e6d
> > Docs-Preview: https://skia.org/?cl=361497
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361497
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> > Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
>
> TBR=reed@google.com,michaelludwig@google.com
>
> Change-Id: I60a98a1ca9a42db6bfc5796cf4df69042571161e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11230
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364097
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:11230
Change-Id: I76ef4d762151475c498e8cf9392bc2191d84fe1a
Docs-Preview: https://skia.org/?cl=366318
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366318
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-02-04 21:17:58 +00:00
Brian Osman
4fca9956db Simplify function declaration handling in GrSkSLFP
This adds a new version of emitFunction that operates directly on an
SkSL::FunctionDeclaration, which saves us the trouble of mapping the
return and parameter types back to the corresponding GrSLType.

It's also a pre-requisite for supporting functions that return or accept
types that can't be mapped like this (eg, structs or enums).

Bug: skia:10939, skia:11246
Change-Id: Ib5d2fb80a983efbf70fe8ce5ac3ba1d769e44d07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361562
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-02-04 20:30:23 +00:00
Chris Dalton
2a1b594716 Get tessellation shaders compiling again on GLSL
Bug: skia:10419
Change-Id: I187144439232c3bb99bfaaaa729067c38696abfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366145
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-02-04 20:25:38 +00:00
Chris Dalton
05007dfd58 Rename GrStrokeOp -> GrStrokeTessellateOp
Bug: skia:10419
Change-Id: I04fecec39610d7519edef8a97f367b329b6eea4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366116
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-02-04 20:25:18 +00:00
Tyler Denniston
04f471aa49 Add GrWangsFormula implementation for conics
Also add a unit test that the vectorized version equals the reference
implementation.

Bug: skia:10419
Change-Id: I4d165fd45532e9ec468565d0637fb769b51f5fcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345122
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-02-04 20:07:28 +00:00
Chris Dalton
2224100b25 Create an abstract GrStrokeTessellator class
Now there is only one op to tessellate a stroke, and it creates its
own GrStrokeIndirectTessellator or GrStrokeHardwareTessellator
internally. This will allow us to dynamically switch into hardware
tessellation when we need to batch strokes that have different
parameters or colors.

Bug: chromium:1172543
Bug: skia:10419
Change-Id: I3cddb855fdbb9ab018785584497c843e3e31b75e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366056
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-02-04 19:57:28 +00:00