Commit Graph

54735 Commits

Author SHA1 Message Date
Michael Ludwig
3752760157 Stop using copying SkPath::Iter for convexity and contains checks
This also ensures that consecutive moveTos at the start and end of the
path do not affect convexity, and updates AutoBoundsUpdate respects
that as well.

Bug: 1187385
Change-Id: I9d9d7ab7f268003ff12e46873d7b98d993db47fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396056
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-04-21 18:45:27 +00:00
skia-autoroll
e07788ee2c Roll skcms from 623cdd693261 to 31ba46d6a284 (1 revision)
https://skia.googlesource.com/skcms.git/+log/623cdd693261..31ba46d6a284

2021-04-21 mtklein@google.com use print_shortest_float() for matrix values

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 jvanverth@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: jvanverth@google.com,mtklein@google.com
Change-Id: Ia751e80822bae892cf60a7f6fa287d73d1f97ad5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399164
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 18:28:27 +00:00
Brian Osman
e37660b43c Use SkRuntimeEffect::MakeForShader in CanvasKit
The old factory is deprecated. The new factory does stricter checking on
the signature of main and calls to sample - verifying that the SkSL is
valid as an SkShader (vs SkColorFilter) at effect creation time.

Bug: skia:11813
Change-Id: I8d70f81b5c3fa78b05add1b591caf1d26dd70402
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399077
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-21 17:44:12 +00:00
Greg Daniel
374f96c9de Don't pass render target to GrGLSLProgramBuilder.
The base class does not use the GrRenderTarget and most subclasses do
not use it eitehr. So remove the GrRenderTarget from these classes and
have specific subclasses store the GrRenderTarget if they need it.

Bug: skia:11809
Change-Id: Idee5419377e1b5e328c8c88666c9344f642beb63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399056
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-04-21 17:42:47 +00:00
skia-autoroll
9db8bb4b05 Roll skcms from a638db877ef8 to 623cdd693261 (1 revision)
https://skia.googlesource.com/skcms.git/+log/a638db877ef8..623cdd693261

2021-04-21 mtklein@google.com zero output_channels to skip B2A CLUT

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 mtklein@google.com,jvanverth@google.com on the revert to ensure that a human
is aware of the problem.

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

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

Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Tbr: mtklein@google.com,jvanverth@google.com
Change-Id: Ib3205076620ff133dfcb54bdbf21b60a32acf3e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399137
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 17:39:07 +00:00
Brian Salomon
5d627f3eba Remove support for SK_DISABLE_BILINEAR_BLUR_OPTIMIZATION
Bug: skia:11796
Change-Id: Ibc29485c2d6375a705d4efa3e2836dff9c73e378
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398818
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-21 16:51:27 +00:00
Brian Osman
f6123f1dcc Convert some SkRuntimeEffect::Make to use stage-specific factories
The old factory is deprecated. The new ones do stricter checking on the
signature of main and calls to sample, and include checks at effect
creation-time that the SkSL is valid for the requested stage.

Bug: skia:11813
Change-Id: Ibd15a6f90e74bdc9c2352d3dc61b6682f626f413
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397477
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-21 16:19:57 +00:00
Brian Osman
af4e2331d1 Add tests of the runtime effect stage factories
We were testing this with .rtcf and .rts files, but those don't go
through the MakeForXXX factories. This would have caught the bug fixed
in https://skia-review.googlesource.com/c/skia/+/398229

Change-Id: Id824e7bf32982c043978b2981cfd91dd7a9b2585
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398183
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-21 16:05:37 +00:00
John Stiles
8676ebe350 Demonstrate DSL for statements with multiple vardecls.
These now work, thanks to a combination of
http://review.skia.org/398221 and
http://review.skia.org/398017.

Change-Id: Ied1d6a39803c19dfa762a45e0ca4800820bb1c0a
Bug: skia:11868
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397219
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-04-21 15:03:37 +00:00
John Stiles
bf9dff6f51 Switch deque to forward_list for memory use.
Landing this to test the difference in memory consumption vs deque. If
this doesn't help, we can try a different approach.

Change-Id: I7d0e8a2e694671db7e7627754bc305991fea5b5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399016
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-21 14:37:57 +00:00
Brian Salomon
9a56eb7063 Consolidate on SkImage_Gpu constructor that takes SkColorInfo.
Also take SkImageInfo in SkImage_GpuBase.

Change-Id: Ie6d71a9a4a3740b9acc0faae72df2796e9a0e567
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398230
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-21 14:19:27 +00:00
Michael Ludwig
af5afed000 Add makeAnalysisCanvas to SkStrikeServer
Once chromium is updated to use this function instead of using the
SkTextBlobCacheDiffCanvas constructor directly, we can update the
analysis canvas to be the base SkCanvas with the custom text analysis
SkDevice. This will let the text analysis become aware of auto-layers
for image filters.

Bug: chromium:1187246, chromium:1194701
Change-Id: I289201b95c368446e57fea01ad0c3e1e3fd0d3c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398658
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-04-21 13:19:57 +00:00
Florin Malita
7924446c45 [androidkit] Add Canvas.drawColor()
Three flavors:

  - Color
  - rgba float tuple
  - int (legacy SkColor)

Change-Id: I3038e27e433a5d92d4c6c3e3bb80374b63f87b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398181
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2021-04-21 13:08:32 +00:00
Florin Malita
3397f71098 [androidkit] Simple animation demo
Oscillating rect demo using a dedicated render thread.

At the moment this is using an intermediate Bitmap for rendering, but
should be converted to native GL Surface when it becomes available.

TBR=
Change-Id: I9b4f66598b6d2b56e865e7f1d10139a2bcf1f3e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398536
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-04-21 13:07:27 +00:00
Jim Van Verth
e7dfbfea1f Disable flight_animated_image on iPhone 6.
Appears to be intermittently hanging on this particular GM.

Bug: skia:11885
Change-Id: I5b9593f4b8e512d356ea206f8b9ec354dd0491bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398182
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-04-21 13:03:27 +00:00
skia-autoroll
c34dc525fc Roll Chromium from f2c9d791993c to 6e17434800cb (445 revisions)
f2c9d79199..6e17434800

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

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

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: jvanverth@google.com
Change-Id: I08dbb4cefc5a56ab650abe6cc9d684d65f41993e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398922
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 05:47:56 +00:00
skia-autoroll
c1e116dd2b Roll ANGLE from b574643ef28c to d170f8e11bdb (12 revisions)
b574643ef2..d170f8e11b

2021-04-21 jmadill@chromium.org infra: Add configs for Android build.
2021-04-21 penghuang@chromium.org Unbind fbo before context switching for PowerVR GPUs
2021-04-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from cb5ad5e674fa to 141612cc6143 (482 revisions)
2021-04-20 ynovikov@chromium.org Skip dEQP-EGL.functional.resize.surface_size.stretch_width
2021-04-20 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from ededa67cb12a to 476acb91ebc2 (22 revisions)
2021-04-20 timvp@google.com Tests: Add "Command and Conquer: Rivals" trace
2021-04-20 syoussefi@chromium.org Roll third_party/vulkan-deps/ c18d8cd50..494bfcf95 (48 commits)
2021-04-20 ynovikov@chromium.org Skip Texture2DBaseMaxTestES3.GenerateMipmapAfterRebase* on Mac ARM GL
2021-04-20 m.maiya@samsung.com Add KHR_blend_equation_advanced entry points
2021-04-20 amy.liu@arm.com Handle the compression of big pipeline cache.
2021-04-20 jmadill@chromium.org Add standalone Android build.
2021-04-20 m.maiya@samsung.com Add EXT_texture_border_clamp entry points

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: jvanverth@google.com
Change-Id: Ide86c8d55ef71efe441ae1ffccde7832ae759dba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398924
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 05:01:27 +00:00
skia-autoroll
5ba330cd13 Roll SwiftShader from dac99e8221a8 to c597a8af03ef (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/dac99e8221a8..c597a8af03ef

2021-04-20 capn@google.com Fix pedantic Clang warning/error
2021-04-20 capn@google.com Add IndentCaseBlocks to .clang-format

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jvanverth@google.com
Change-Id: I488c1aeb7d4c553d6f146dd4a67ceb7a7f1353e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398923
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 04:52:06 +00:00
weiyuhuang
04c82165b1 [canvaskit] Add halfLeading to TextStyle and StrutStyle
- Add halfLeading (introduced in https://skia-review.googlesource.com/c/skia/+/394969) to canvaskit bindings

- Fix wrong initial value of fDescent

Change-Id: I01d522cd5a3761f32426038dce2ab82f24c9c529
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398276
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2021-04-20 20:21:56 +00:00
John Stiles
60191e0502 Revert "Implement statements and expressions in DSL C++ code generator."
This reverts commit 16cbfb41df.

Reason for revert: using ES3 features, breaks on ANGLE ES2 bots

Original change's description:
> Implement statements and expressions in DSL C++ code generator.
>
> This CL removes the bulk of the existing C++ code generator, especially
> all the complex format-string assembly code. It has been replaced with
> actual DSL code generation. Simple IR can now be successfully translated
> to a working DSL fragment processor.
>
> This CL also adds a simple test harness which is patterned after the
> existing SkSLTest; it renders a pixel, reads it back, and fails the test
> if the result isn't solid green (RGBA=0101).
>
> This CL doesn't implement every feature. Some obvious gaps include:
> - Sampling from children
> - Uniforms/inputs of any kind
> - Function calls of any kind
>
> Change-Id: Ib80c23fe1ba4453f7c3cb43b65f93c5ea0deb709
> Bug: skia:11854
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396757
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

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

Change-Id: I4f3e7667bf1e3a5539d0248b6c47d9ae2296aa88
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398739
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-20 19:59:37 +00:00
Eric Boren
72ca357cf2 [infra] Update recipe deps
Change-Id: Ib0a75da6f9ee4d2cd78dcf67a1d45047264a6001
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398737
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2021-04-20 19:49:56 +00:00
Joe Gregorio
d0ef90769b Add Debug Pixel5 bot.
Bug: skia:11883
Change-Id: I4a1459b28c6690990e475fd6fe28edcd72c8a83b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398736
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2021-04-20 19:41:36 +00:00
John Stiles
16cbfb41df Implement statements and expressions in DSL C++ code generator.
This CL removes the bulk of the existing C++ code generator, especially
all the complex format-string assembly code. It has been replaced with
actual DSL code generation. Simple IR can now be successfully translated
to a working DSL fragment processor.

This CL also adds a simple test harness which is patterned after the
existing SkSLTest; it renders a pixel, reads it back, and fails the test
if the result isn't solid green (RGBA=0101).

This CL doesn't implement every feature. Some obvious gaps include:
- Sampling from children
- Uniforms/inputs of any kind
- Function calls of any kind

Change-Id: Ib80c23fe1ba4453f7c3cb43b65f93c5ea0deb709
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396757
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-20 19:28:36 +00:00
Kevin Lubick
e058608626 [canvaskit] Fix transform() call in test
This started to fail in Chrome 90.

Change-Id: I77e96f155b6ab83d206b3d258b971fef2f7d3a62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398677
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-04-20 18:12:13 +00:00
Kevin Lubick
4eaa3925ba [canvaskit] Split paragraph_bindings into two files for generation POC
Generating the enum code should be a good first step for
automatically generating the C++ binding code using some type
of annotation.

Change-Id: I3a2af66204cf48a1efb4f24b7a4af59626100227
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398676
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2021-04-20 18:11:45 +00:00
Chris Dalton
94df572a13 Convert dmsaa to an SkSurfaceProp
Bug: skia:11396
Change-Id: I1c2a72d80679df1c11529d05cbe781f6dfae6a79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396810
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-04-20 16:24:56 +00:00
Chris Dalton
f5b87f9b11 Make SkSurfaceProps non-optional for SDCs and SkSpecialImages
This ensures we don't lose the original SkSurfaceProps when creating
image filters, etc.

Bug: skia:11396
Change-Id: I6b412361c1005138278a1396faa7f7e069ec7eb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397291
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-04-20 16:22:46 +00:00
Chris Dalton
e0ee932e5e Preserve sdf text in SkPictureImageFilter
This code appears to be clearing out the SkSurfaceProps in order to
disable LCD text. We ought to be able to only disable the LCD text,
while preserving the SkSurfaceProps flags.

Bug: skia:11396
Change-Id: I7c1f49f59639404535a445f0318ab97b07c20c84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397636
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-20 16:19:36 +00:00
Adlai Holler
4d92e41839 Revert "Enable DAG reordering on all bots except one"
This reverts commit b8e02c5f38.

Reason for revert: Broke Pixel5 glesmsaa4 desk_mapsvg.skp

Original change's description:
> Enable DAG reordering on all bots except one
>
> Before this CL, only select bots used reordering. After this CL,
> all bots except the NUC5PPYH use the flag.
>
> Once all our clients are migrated, we'll remove the flag altogether.
>
> Bug: skia:10877
> Change-Id: Iee734f8b99ae9eba6c1947009d8164032594b051
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398219
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>

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

Change-Id: Iadf4f779bbaa1c5406d5f88e448994951ae89ae4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398179
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-04-20 15:48:07 +00:00
John Stiles
89b484aee3 Simplify parsing of for init-statements.
The existing logic was written before `varDeclarationsOrExpression-
Statement` existed. The new logic mirrors how this->statement() would
behave, except that it doesn't even try to parse keywords that can't be
used in an init-stmt (like do, if, switch, while, etc.)

Separately, I've tried just calling `this->statement()` directly, and it
does work, but it is too permissive--statements that can compile away
to a no-op (like `switch(0) {}`) suddenly become valid inside a for
init-statement. This is probably solvable but there's not much of a
reason to investigate further when the parser can catch these already.
DSL doesn't go through the parser, but we're willing to accept this
weak spot for DSL since it is always safe; either we catch and report
the error, or the code was meaningless and optimizes away to nothing.

Change-Id: I44779ec39b30cf958255534d3d5c5eb3d71d4023
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398227
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>
2021-04-20 15:21:26 +00:00
Chris Dalton
6475638790 Add GrPathUtils::conicHasCusp
Bug: skia:10419
Change-Id: I4250dddf463a66f803148310304f29e0c629bc33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397657
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-04-20 14:52:06 +00:00
John Stiles
1a15e57ce6 Revert "Fix for loops with multiple init-variables in Metal."
This reverts commit a36fa6636b.

Reason for revert: http://review.skia.org/398221 instead

Original change's description:
> Fix for loops with multiple init-variables in Metal.
>
> This is structured differently than the GLSL fix, due to the different
> semantics of array-types in Metal.
>
> Change-Id: I27ad11539bbbb96abb0686d5686b8fcd2f5dd6d1
> Bug: skia:11860
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396916
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

Bug: skia:11860
Change-Id: I53a8132a72068bc9bff74ce1b2e69bc0618c106a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398224
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-04-20 14:43:41 +00:00
John Stiles
b1992c27c2 Revert "Fix for loops with multiple init-variables in GLSL."
This reverts commit f1ce6faf29.

Reason for revert: http://review.skia.org/398221 instead

Original change's description:
> Fix for loops with multiple init-variables in GLSL.
>
> When a Block is detected in the for loop's init-statement, we now
> synthesize a scope and write the init-statement directly above the for
> loop and leave the for loop's init-stmt section empty.
>
> Change-Id: I3e89c6a4328a79e49b8a19faae7975629cd0e152
> Bug: skia:11860
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396820
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Bug: skia:11860
Change-Id: I9d43ee319f085d4ae226c4ab6d7c53c407ed5586
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398223
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-04-20 14:39:56 +00:00
John Stiles
49b409e680 Simplify for init-stmts at the IR level.
Most backends don't like init-stmts with multiple VarDeclarations inside
them, so we no longer emit IR that does this. This lets us avoid doing
backend-level fixups.

Change-Id: Ide839de18953a73e0f9c7a690df59a7bc3523f89
Bug: skia:11860
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398221
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-04-20 14:38:36 +00:00
Adlai Holler
b8e02c5f38 Enable DAG reordering on all bots except one
Before this CL, only select bots used reordering. After this CL,
all bots except the NUC5PPYH use the flag.

Once all our clients are migrated, we'll remove the flag altogether.

Bug: skia:10877
Change-Id: Iee734f8b99ae9eba6c1947009d8164032594b051
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398219
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2021-04-20 14:19:35 +00:00
Brian Salomon
6ef10e9a2b Add SkImage_Base::asFragmentProcessor().
This is a step toward removing the various GrTextureProducer classes
and moving their functionality into SkImage subclasses. Currently,
the new method just creates the appropriate producer and invokes
its methods to create the FP.

Use in SkImageShader.

Bug: skia:11877
Change-Id: Idd9776d219ad69a5763c22603d1d06ddadb7ad47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398220
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-20 13:52:36 +00:00
Brian Osman
b278967af7 Fix Android build (SkVertices API change)
Change-Id: If0ab7ee6b8518f679ed5d9d806c52eb7a6df938b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398456
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-20 13:36:07 +00:00
Adlai Holler
9950171bea Reduce VRAM budget on nanobench bot
Basically applies CL 398217 to nanobench as well.

Bug: skia:10877
Change-Id: I9f30c5d591be1c08e3a8c89dd873040d6b7a5b50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398225
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-04-20 13:31:45 +00:00
Joe Gregorio
fb5865e650 Add Sparky360, aka Acer Spin 512, Chrome OS device.
Bug: skia:11876
Change-Id: I4fed0accb0797163add0dc622bbe93b24dec2641
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398036
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2021-04-20 13:31:06 +00:00
skia-autoroll
d9bf97c5e2 Roll Chromium from 3e8dec5e7dff to f2c9d791993c (436 revisions)
3e8dec5e7d..f2c9d79199

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

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

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: jvanverth@google.com
Change-Id: Iee293415be975782519c029855cba4b691643d70
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398317
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-20 05:08:05 +00:00
skia-autoroll
472716eb46 Roll ANGLE from b027dfeb83d0 to b574643ef28c (7 revisions)
b027dfeb83..b574643ef2

2021-04-19 geofflang@chromium.org D3D11: Skip blits if there is no intersection of dest areas
2021-04-19 jmadill@chromium.org Revert "infra: Switch to "angle_2" presubmit config."
2021-04-19 m.maiya@samsung.com Vulkan: Keep the output variable of TCS active for barrier
2021-04-19 jmadill@chromium.org Revert "Revert "Vulkan: Suppress draw-time push constant VVL warnings."
2021-04-19 jmadill@chromium.org infra: Switch to "angle_2" presubmit config.
2021-04-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from f32791f5d53b to dac99e8221a8 (1 revision)
2021-04-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 11d568cbfed1 to cb5ad5e674fa (484 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 jvanverth@google.com on the revert to ensure that a human
is aware of the problem.

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: jvanverth@google.com
Change-Id: I1f9cdc8379a452ea6b84936d4dfe5719939bb8e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398318
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-20 04:50:55 +00:00
skia-autoroll
d8c2750cf6 Roll Dawn from b6c0dac11024 to 8091c6845079 (4 revisions)
https://dawn.googlesource.com/dawn.git/+log/b6c0dac11024..8091c6845079

2021-04-19 bclayton@google.com Cleanup transform usage
2021-04-19 jrprice@google.com Update WGSL in tests with renamed builtins
2021-04-19 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 4649377d0575 to b69660733875 (1 revision)
2021-04-19 cwallez@chromium.org dawn_native: Use refcount-safe methods for reentrant object creation

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 4649377d0575 to b69660733875

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 rharrison@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: rharrison@google.com
Change-Id: I1486e29eaf3a318e28c0e25729bc4c04fe210aa6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398319
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-20 04:50:15 +00:00
Brian Osman
9d11cbdef8 Fix soft merge conflict in SkRuntimeEffect
This meant that the new Shader/ColorFilter factories were always
compiling against the more lenient (old) rules.

Bug: skia:11813
Change-Id: I65038595edf2c6087aad6efcd27508338b24cce8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398229
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-19 21:55:25 +00:00
Michael Ludwig
8ced56f05f Allow Convexicator to implicitly close correctly
In the old code, fFirstPt actually pointed to the first added point that
came *after* a call to setMovePt. The moved-to point that started the
contour was never remembered in the Convexicator, so it required the
SkPath::Iter to force close. When the iterator force-closed, it made
sure to add a line-to back to the start of the contour, which it could
do because the Iter was also tracking the contours.
 - It's important that the old code's close()'s addPt(fFirstPt) actually
   re-added the first point after the move-to because it catches
   concavities that occur at vertex that started the contour. The first
   time that point is added, we have no initial vector to check for
   direction changes against.

In the new code, I've updated the state tracking to be more straight
forward. fCurrPt and fLastPt were redundant (they always equaled each
other once addPt returned). fPriorPt was also redundant when combined
with the expected direction enum, since it's only use was to determine
when to cache the initial vector. I also found it confusing to know
the difference between fLastPt and fPriorPt based just on variable
names.

Now fFirstPt refers to the location of the moveTo/"start of contour",
and fFirstVec is the direction vector leaving that point to the next
point in the contour. fLastPt is the point that was last passed to
addPt and fLastVec is the direction that comes into 'fLastPt'.  The
close() function is updated to add a point back to fFirstPt (which does
nothing if the close is explicit, or handled by SkPath::Iter) AND it
checks for a dir change on the first vector.

This shouldn't change any behavior, so I wanted it as a standalone
change, but it will allow
https://skia-review.googlesource.com/c/skia/+/396056/ to
update computeConvexity() to move away from
SkPath::Iter(forceClose=true).

Bug: skia:1187385
Change-Id: Iff383693956b28e3c21b23e5a5c6ce814227bb27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398018
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-04-19 20:49:15 +00:00
Julia Lavrova
b40c925b82 Removing the staging flag for Google3 (SK_PARAGRAPH_ROUND_POSITION)
Change-Id: I45ff82fb1e6083c90248b174b8d088d91be75825
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398216
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-04-19 19:01:54 +00:00
Brian Osman
8f1dff6a9e Remove layout(marker) from runtime effect SkSL
This is another strange, experimental feature that clutters the
implementation and isn't used by anyone (to my knowledge).

Change-Id: I538b7eca0cd28aab32f4739b23459731ade9105e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398226
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-19 18:48:45 +00:00
Ben Wagner
f6cc85844f Reland "Fix sk_app macOS raster window build conditions."
The "raster" window on macOS and iOS is actually backed by GL. Fix the
build rules and code conditions to reflect this. This allows for some
sk_app applications to run on macOS and iOS with skia_use_gl=false.

> Revert:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

> Land:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: Ia8a421f4818856dd90cb4847095eee0d1836d1e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398056
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-04-19 18:25:44 +00:00
Jim Van Verth
c36ccb6aef Direct3D: add aliasing texture support
In D3D we can alias a resource's allocation and re-use it for
another resource. For example, this is used in the mipmap generator
when we have an sRGB texture. The sRGB formats can't be used in a
UAV, but we can use an aliased texture with the corresponding linear
format, and do the sRGB conversion in the compute shader.

Change-Id: I6995cdecf5be36aafbed5c48e639c09f41ec4f8b
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397996
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-04-19 18:20:44 +00:00
Brian Osman
e49703faf2 Remove custom SkVertices data and runtime effect varying support
This was an experimental feature. It worked (but only the GPU backend).
It was never adopted or used by anyone, to my knowledge. It's a large
amount of code, and a strange corner of SkSL for users to stumble into.

Bug: skia:10680
Change-Id: I0dda0364bce7dbffa58c32de4c7801ec2a6bc42e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398222
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-19 17:49:25 +00:00
Mike Reed
4c8c87e815 Show text hilites
Font was missing getMetrics()

However, seems like getShapedRuns() needs to return its
particular line spacing choices...

Change-Id: I574ebf789fb03b79c8e09198f1cb6e09dac3441b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397916
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2021-04-19 17:45:51 +00:00