Part of the larger work to remove drawImage from canvas (and in general
simplify our apis w.r.t. older patterns like skbitmap).
Change-Id: If208927e1d46256519036c42e68aec3d3c809a82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358836
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Comparing sqrt(5) against a variable containing sqrt(5) was not working
properly in some versions of Android running Vulkan.
Change-Id: I4f6bbff78a9ba56ec6e222f2037d66b13e3cd635
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358530
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I59821d748768d74b251d9339787f193c23e3d4dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358526
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Evaluating either kind of expression now works like all other
expressions - evaluate the inner part, then work with the resulting
values. Added unit tests for both of these that previously failed.
With this change, writeVariableExpression is only used for
VariableReference expressions, so adjust that, too.
Bug: skia:11178
Change-Id: Ia595be473b55f4bb03ec25897f9929835177257c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358529
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is a reland of f5aed172c6
Original change's description:
> [infra] Use Mac10.15.7 and xcode12.3 for all builds.
>
> Bug: skia:11129
> Change-Id: I314d51988e4cafc9dfea60bc70a57f46faa8666a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345396
> Reviewed-by: Eric Boren <borenet@google.com>
Bug: skia:11129
Change-Id: I00bca0407ff7522bafca3f4e4e0aa92c239043fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353036
Reviewed-by: Eric Boren <borenet@google.com>
This is a reland of 4ecab92584
This reland folds in subsequent code cleanups and disables a test that
failed on Android + Vulkan.
Original change's description:
> Run unit tests to verify SkSL folding behavior.
>
> The unit test loads SkSL source files from `resources/sksl`, compiles
> the code, and uses SkRuntimeEffect to render a pixel using the effect.
> If solid green is rendered, the test passes.
>
> Change-Id: I2ccb427a907975ae84aee19d8e68d774b2cb638c
> Bug: skia:11009
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355983
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:11009
Change-Id: I09196c8ca3041e8957324a0cbb7f7d6963c6e4e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358523
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
There are SkColorTypes (e.g. kBGR_101010x) that don't have Gr equivs.
When a SkPixmap is converted to GrPixmap we will have a kUnknown color
type.
Bug: chromium:1164705
Change-Id: Iefa2c8363582433a531c5501aa251c571b5a6eab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358521
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit 3b5b7d1178.
Reason for revert: Arenas cant be moved
Original change's description:
> Merge adjacent GrOpsTasks with same target together
>
> This allows the ops tasks to make one render pass instead of multiple.
> The only case where this merging is needed is as a result of
> reordering (reduceOpsTaskSplitting).
>
> Bug: skia:10877
> Change-Id: Ia967ead6efc43f7d2c1da58f770d3987da690cda
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353656
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>
TBR=egdaniel@google.com,robertphillips@google.com,adlai@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:10877
Change-Id: I6d1813ee1c28bc43dffb0a5f26dba4a5c41c637f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358522
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This attempt to retain a std::move'd value was inadvertently left in
place in a previous CL. It's harmless, but should have been removed.
Change-Id: I485e0f14d921fe6c87a62520c7478a28e8ce28d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358517
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
In preparation for text bounding box support, fission the actual
rendering phase from the shaping/alignment phase:
- rename onRenderText -> onShapeText
- introduce a ShapedTextCallback abstraction for consuming the result
of text processing
- relocate the final rendering step to a ShapedTextCallback impl
Bug: skia:10840
Change-Id: Ia8cc0d9a5a5484972a34042fd782f9e4fada6b12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358223
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Per spec [1], unspecified inputs ('in', 'in2' attributes) have different
meaning depending on whether the referencing filter is the first in the
pipeline. This CL adds previous result tracking to the filter context
and handles unspecified values accordingly during input resolution.
[1] https://www.w3.org/TR/SVG11/filters.html#FilterPrimitiveInAttribute
Bug: skia:10841
Change-Id: I64618ad712979f6dd62adb4686085fe31618c3cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357278
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Will be needed for repositionable DDLs.
Change-Id: I6dacf51bd36cfbe1c54a9350987f17a6d18cf3c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357776
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Per spec (and empirically) <text> elements are not nestable (neither
directly or indirectly):
https://www.w3.org/TR/SVG11/intro.html#TermTextContentChildElement
Update the implementation to
- only bridge onRender -> onRenderText in the root SkSVGText
implementation
- disallow <text> elements as text container descendants
Change-Id: I07b3abaf943b820e01c88f78bddf7ce5970ee508
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358220
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
ff5f715e5c..3c3b82abcf
2021-01-22 cnorthrop@google.com Tests: Add Hearthstone trace
2021-01-22 syoussefi@chromium.org Vulkan: Unconditionally expose OES_shader_io_blocks
2021-01-22 geofflang@google.com Roll Khronos headers.
2021-01-22 ynovikov@chromium.org Suppress headers includes privacy checks on iOS
2021-01-22 jmadill@chromium.org Capture/Replay: Allow testing with multiple versions.
2021-01-22 jmadill@chromium.org Capture/Replay tests: Fixes for goma & depot tools.
2021-01-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 22be66d40712 to 9441aea16221 (10 revisions)
2021-01-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f646afdb8929 to a0047c0f6ec8 (1 revision)
2021-01-22 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 67fb6a8435bb to 318dff1807ef (435 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 nifong@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: nifong@google.com
Test: Test: angle_perftests --gtest_filter="*hearthstone*"
Change-Id: I1490f66fd892a9d3078f3b9ff8ce53649878857b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/358417
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Allows creation of an image directly from a RTE. Caller provides the
effect input bindings, image info for the image, and optional local
matrix.
The info's alpha type and colorspace are tags for the output image. No
alpha type or color space conversions are applied to the output of RTE.
CPU does not yet support making kUnpremul images.
Bug: chromium:1151490
Change-Id: I69babc9dbbce4431d756cd7a3eef4753e727d6fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357284
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
For the tessellation op this allows it to use either the record-time
or flush-time allocator instead of making its own.
Bug: skia:10419
Change-Id: Ida13283feffda1976bd8fd221d5be0013a5de990
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356516
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Temporarily puts inner fan triangulation behind a flag so we can
disable it for the atlas. The next CL will do the same thing by
creating an op that doesn't triangulate, but making the functional
change in this CL allows us to triage the diffs ahead of time. It will
also ensure the next CL doesn't introduce any others diffs.
Bug: skia:10419
Change-Id: Ia498957c53e83fe40aa797cadace171902dbf548
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357137
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 4ecab92584.
Reason for revert: breaking all the vulkan bots
Original change's description:
> Run unit tests to verify SkSL folding behavior.
>
> The unit test loads SkSL source files from `resources/sksl`, compiles
> the code, and uses SkRuntimeEffect to render a pixel using the effect.
> If solid green is rendered, the test passes.
>
> Change-Id: I2ccb427a907975ae84aee19d8e68d774b2cb638c
> Bug: skia:11009
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355983
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: Ife32f6c33d9ba7a9580b66eb312cffb249c43cb2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357780
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit eeeaae9a02.
Reason for revert: other reverts
Original change's description:
> Consolidate SkSL CPU and GPU test code.
>
> This doesn't change any behavior conceptually, just allows the test code
> to share more logic between CPU and GPU sides.
>
> Change-Id: I3564f0310fd45c6ead9cd1ee6975915fe33919ee
> Bug: skia:11009
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357596
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I7c6f26d0f84b8c290093c3e6088553f1130fc67e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357996
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
We can load into two or four adjacent registers from alloc_tmp(N) and
then simply name the right one as our output, discarding the others.
This still has the major TODO of returning all two/four registers at
once, eliminating the immB selector and the redundant memory traffic.
Expect changes towards support for up to 4 Vals per Op next week.
Change-Id: I94846d15ac59d4018c1c9d136c17833e5091f8cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357305
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This allows us to write SkSL shaders which are valid both for use as
Runtime Effect, and for compilation with skslc targeting Metal.
Change-Id: I74e125d81865d4092e657a7d9948d2e72054bda5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357777
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>
(and Ternary for good measure)
Change-Id: I4afa121d54ab9ba8d0814693ce53da7cb73ef340
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353626
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Added asserts that verify we don't try to emit the same struct or array
with two different memory layout rules. Some code paths were failing to
inspect the associated variable, leading to incorrect errors about the
attached offsets of members.
Added a test case that triggered that error, and also triggers the new
asserts.
Then, fixed the underlying cause: writing out the struct definition as a
side effect of accessing a member in getLValue().
Bug: skia:11205
Change-Id: I6e5fb76ea918ec9ff10425f2d519ddbc54404b27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357436
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This allows the ops tasks to make one render pass instead of multiple.
The only case where this merging is needed is as a result of
reordering (reduceOpsTaskSplitting).
Bug: skia:10877
Change-Id: Ia967ead6efc43f7d2c1da58f770d3987da690cda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353656
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
This doesn't change any behavior conceptually, just allows the test code
to share more logic between CPU and GPU sides.
Change-Id: I3564f0310fd45c6ead9cd1ee6975915fe33919ee
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/357596
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
No longer used. Remove old numerically unstable scaling.
Change-Id: I3aa05369167377e0277eaca155536c2f1e8036b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356379
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The unit test loads SkSL source files from `resources/sksl`, compiles
the code, and uses SkRuntimeEffect to render a pixel using the effect.
If solid green is rendered, the test passes.
Change-Id: I2ccb427a907975ae84aee19d8e68d774b2cb638c
Bug: skia:11009
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355983
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
1. Removes clamping of spotlight's specular exponent, which is not the
specified behavior of feSpotLight in SVG.
(note: we never clamped a specular lighting effect's
specular exponent/shininess parameter, although SVG 1.1 does clamp
that; that is the client's responsibility).
2. Fixes a bug in the GPU implementation of scale factor for spot lights.
3. Saturate computed lighting color after multiplying with color scale,
instead of just saturating the color scale (allows high intensity
lights to saturate to white which is more reasonable approximation of
an HDR effect stored in an LDR color).
Note: fixes 1 and 2 were originally addressed in https://bugs.chromium.org/p/chromium/issues/detail?id=472849
but the change was reverted for layout failure reasons and it was never
relanded after rebasing.
Note2: most of the layout test rebaselines necessary for chrome are
minor and related to fix 2. The exception is svg/dynamic-updates/SVGFESpecularLightingElement-dom-kernelUnitLength-attr.html
which is the result of fix 3. It took a little digging, but I believe
that fix 3 actually makes that generated SVG more correct (it's original
expected image was "wrong").
In that test, it has a specular constant of 4 (which is a multiplier)
and a shininess of 1 (which makes it practically a "diffuse" specular).
So basically we are multiplying the greenYellow color by 4 for most of
the image that has a normal pointing out of the screen. Firefox renders
a similarly yellow oversaturated appearance instead of clamping to the
base greenYellow.
Reading the feSpecularLighting spec, there is no saturation that is
specified where it had been performed before this change. Instead, all
that is mentioned is that the results of a given filter have to be pinned
to the color channel range (e.g. the last step).
Bug: skia:11007, skia:11057, skia:11153
Change-Id: I82e4a6f1742fecea59816fda75eb931c2a51d3e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355496
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>