Commit Graph

54816 Commits

Author SHA1 Message Date
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
Chris Dalton
50f5e68b7c Use the word "precision" to describe "1/tolerance" for linearization
Bug: skia:10419
Change-Id: Ie01122ab8c9130367988fd2e264fcf4761862e89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397656
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-19 17:38:35 +00:00
Adlai Holler
53a65b2b6f Reduce VRAM budget on one perf bot
This will let us see the reordered_dags_over_budget stat
in perf so that we know our fallback code path is getting tested.

Bug: skia:10877
Change-Id: I073c8622ddb8f3449511193bac045bfebc4e277c
Cq-Include-Trybots: luci.skia.skia.primary:Perf-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Release-All
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398217
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2021-04-19 16:04:34 +00:00
John Stiles
8e2a84be3d Fix for fuzzer-discovered error in SPIR-V compilation.
Unused InterfaceBlocks were not added to the ProgramUsage map. The
ProgramUsageVisitor now makes sure to account for them during its
initial scan.

Change-Id: If3afac8e954c5b685ddc6b63b0f771d8c0b8f207
Bug: oss-fuzz:33405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398016
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-19 15:55:04 +00:00
Ethan Nicholas
db2326b46a Comma operator on DSL statements now creates unscoped blocks
Change-Id: I9eb85f25431b2d59b26e8cf8f4a73b9e45faa916
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398017
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-04-19 15:37:24 +00:00
Brian Osman
cc3d2d25c5 Runtime effects: Detect passthrough sample calls automatically
As explained, this is *very* conservative. It only works when the child
is sampled from within main, and using a direct reference to the coords
parameter. If that parameter is ever modified (even after being used),
the optimization doesn't happen. For most cases, this is fine.

Bug: skia:11869
Change-Id: Ia06181730a6d07e2a4fe2de4cc8e8c3402f0dc52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397320
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-19 14:52:44 +00:00
Brian Salomon
d0f35c241c Reflatten YUVA image on each request.
It should now be rare to require a RGBA texture from a YUVA image (e.g.
in image filter)

Removes a thread-safety issue. A step towards allowing clients to pump
new data into the planes and be sure Skia wont draw the old contents.

Bug: skia:11873

Change-Id: I007cf28e477155f85ed9f1c6cc4547f9dbbb73fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397319
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-19 14:52:04 +00:00
Brian Salomon
816db16d19 GrMatrixEffect applies coord normalization/flip for GrTextureEffect.
It checks if its child is a GrTextureEffect and if so the child supplies
a matrix to concat.

Additionally, GrTextureEffect shader modes that operate on unnormalized
texture coords no longer receive prenormalized coords that must be
unnormalized.

Hoping this addresses (maybe partially) this regression:
https://perf.skia.org/e/?begin=1618332600&end=1618386249&keys=Xdf47e259cd874b84b2e0c31c9465abe8&num_commits=50&request_type=1&xbaroffset=54589

Bug: skia:11844
Change-Id: I97eeb88440d5d81acb3edd8c406b17680da67438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397218
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-19 14:26:14 +00:00
skia-autoroll
59f1a9cb7a Roll Chromium from c6b364c274f4 to 3e8dec5e7dff (495 revisions)
c6b364c274..3e8dec5e7d

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: Ie6054c5c6ed4f48391197886d28236836325396d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397936
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 05:35:06 +00:00
skia-autoroll
5aebc93d38 Roll ANGLE from f2aa9d5da699 to b027dfeb83d0 (13 revisions)
f2aa9d5da6..b027dfeb83

2021-04-19 syoussefi@chromium.org Revert "Vulkan: Suppress draw-time push constant VVL warnings.
2021-04-17 syoussefi@chromium.org Suppress fifa mobile on intel/windows
2021-04-17 cnorthrop@google.com Tests: Add 3DMark Slingshot Test 2 trace
2021-04-17 cnorthrop@google.com Tests: Add 3DMark Slingshot Test 1 trace
2021-04-17 syoussefi@chromium.org Vulkan: Remove inappropriate use of VK_NULL_HANDLE
2021-04-17 cclao@google.com Vulkan: Add support for FBO with unequal sized attachments
2021-04-16 cclao@google.com Vulkan: Add test for FBO with unequal sized attachments
2021-04-16 syoussefi@chromium.org Skip failing test on AMD/Linux
2021-04-16 xiaoxuan.liu@arm.com Reland "Reland "Add support for Linux GPU info with Vulkan backend""
2021-04-16 cnorthrop@google.com Migrate more scripts to python3
2021-04-16 geofflang@google.com Remove 3pp files in third_party/jdk.
2021-04-16 m.maiya@samsung.com Vulkan: Handle non array type varying error case in TS
2021-04-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from cac0b331e3fc to 11d568cbfed1 (483 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
Test: Test: FramebufferTest_ES3.AttachmentWithUnequalDimensionsTest: Test: KHR-GLES32.core.tessellation_shader.compilation_and_linking_errors.te_non_arrayed_per_vertex_input_blocksTest: Test: angle_perftests --gtest_filter="*slingshot_test1*"Test: Test: angle_perftests --gtest_filter="*slingshot_test2*"Test: Test: python3 scripts/run_code_generation.py
Change-Id: Ie29de29aa0708d54d19b905df38177e97d0797e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397841
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 04:56:36 +00:00
skia-autoroll
3be203df83 Roll SwiftShader from f32791f5d53b to dac99e8221a8 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f32791f5d53b..dac99e8221a8

2021-04-16 capn@google.com Update Kokoro's clang-format to version 11.0.1

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: Ib7a189bb5a0eb006bce811a0985060ca3cea92ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397937
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 04:55:56 +00:00
skia-autoroll
5e99e36be0 Roll Dawn from 413dcf8a40df to b6c0dac11024 (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/413dcf8a40df..b6c0dac11024

2021-04-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from fe70c75bc573 to 4649377d0575 (10 revisions)
2021-04-17 bajones@chromium.org Deprecate renderpass color/depth .attachment
2021-04-16 jrprice@google.com Enable WGSLUnsortedStructIO test
2021-04-16 jrprice@google.com Revert "Temporarily stop running tests on D3D12 with use_tint_generator"
2021-04-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from cc46e393e481 to fe70c75bc573 (19 revisions)
2021-04-16 enga@chromium.org Add default to VertexState.bufferCount

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

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: Ica6872ca088498ff7f7f6a4307720a696d228d79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397842
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 04:46:06 +00:00
skia-recreate-skps
8548784ed3 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I10c87489c3e0812c80b61a4128858e56537b36cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397896
Reviewed-by: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2021-04-18 08:41:37 +00:00
skia-autoroll
be82005209 Roll SK Tool from dfcdab06d626 to 70f14bb1a417
https://skia.googlesource.com/buildbot.git/+log/dfcdab06d626..70f14bb1a417

2021-04-18 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update CIPD Packages

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: I0e97e303c47cc1854c77face5a40a781d244195a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397838
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-18 07:32:56 +00:00
Brian Osman
9d4741370c Revert "Fix sk_app macOS raster window build conditions."
This reverts commit 163ba10dde.

Reason for revert: Mac linker errors

Original change's description:
> Fix sk_app macOS raster window build conditions.
>
> The "raster" window on macOS 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 with skia_use_gl=false.
>
> Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=bungeman@google.com,brianosman@google.com

Change-Id: Ie5fa24138e4387784c21559f28528a4c4d335626
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-17 17:41:27 +00:00
Ben Wagner
163ba10dde Fix sk_app macOS raster window build conditions.
The "raster" window on macOS 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 with skia_use_gl=false.

Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-17 15:18:05 +00:00
Mike Reed
66aed2136b Expose proposed Shaper API to JS
Requires: https://skia-review.googlesource.com/c/skia/+/392837

Change-Id: I3b779b699fbcade7702049a83b98db8dfe86433d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397436
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-04-17 15:16:23 +00:00
skia-autoroll
d0ca961bd2 Roll SK Tool from 322ca33c3401 to dfcdab06d626
https://skia.googlesource.com/buildbot.git/+log/322ca33c3401..dfcdab06d626

2021-04-16 lovisolo@google.com [gold] Port various utility functions to TypeScript.
2021-04-16 borenet@google.com [autoroll] Remove waterfall -> emscripten-releases, add v8
2021-04-16 borenet@google.com Update CIPD Packages

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: I13b0c9c554398f2a7de6593552318908888ae5c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397676
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-17 08:57:54 +00:00
John Stiles
68072a4676 Perform the loop-exit test when continuing from inside a do-while.
SPIR-V would previously jump to the top of the do-while loop when
encountering a `continue`. This is not correct; it should jump to the
loop-exit test. We don't have any real shaders which test this case, and
it can't be checked from inside Runtime Effects since do-while is not
part of ES2.

Change-Id: Iac58e9e7ad0a94640e6418afea096b19ba50a2df
Bug: skia:11874
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397576
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-16 22:36:14 +00:00
Kevin Lubick
6e927095e1 [canvaskit] Remove isNode and saveAsPicture
This should fix https://github.com/flutter/flutter/issues/80221

Change-Id: I25e0ad58bcaad95b43cc94476af0e241e17ac244
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397289
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-04-16 20:55:54 +00:00