Commit Graph

51125 Commits

Author SHA1 Message Date
Ethan Nicholas
31acd98b2d fixed Google3 build failure
We had an #ifdef DEBUG (rather than the intended SK_DEBUG) which was
never actually compiled due to DEBUG not being defined. Apparently G3
defines DEBUG, and this code started failing.

Change-Id: I4c3695440ddae91c90605f742791eabc51b2fe6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322616
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-05 19:39:58 +00:00
Ethan Nicholas
0d31ed5068 moved SkSL ForStatement data into IRNode
Change-Id: I87039ae982c7f5b6ed7a4cc236470f049606c45e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321468
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-05 19:27:38 +00:00
Ben Wagner
ae4bb98f13 Reland "Remove use of legacy display globals."
This is a reland of c1916c34fe

As it turns out, benches are not always given a canvas.

Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

Change-Id: I61a2ac058fafc99653e3304876cf4b97350dac8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322490
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-05 19:13:58 +00:00
Herb Derby
4c3486e6f1 add pixel xl to skpbench
Change-Id: I931292a74e39eb06715ce3dde6a4662474a23df6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322322
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-10-05 18:34:18 +00:00
Nigel Tao
bf4605ffc3 Have SkWuffsCodec use PIXEL_BLEND__SRC_OVER
This takes the "one pass" code path more often, using less memory, as it
does not have to allocate an intermediate width*height pixel buffer.

Wuffs v0.2 did not support SRC_OVER, only SRC, but Wuffs v0.3 does.

The gif-transparent-index.gif test file comes from the
test/data/artificial directory of the github.com/google/wuffs
repository. It was programmatically generated.

The new GifTest.cpp test passes with skia_use_wuffs true or false, with
or without the SkWuffsCodec.cpp change.

Change-Id: I46fb4c849319fbefc39f331416a8b7d3836093ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320116
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-10-05 18:24:48 +00:00
Brian Salomon
f165f799ae Remove unused variant of SkImage::MakeFromYUVAPixmaps
Bug: skia:10632
Change-Id: I337d79d856945071b2b68651a80013184d443267
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322480
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-10-05 18:08:28 +00:00
Ethan Nicholas
e2c4999ec3 Revert "Revert "moved SkSL Field data into IRNode""
This reverts commit 58384ad0a7.

Change-Id: I18fcf623675cd97224f99c048fd691b4799d2479
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-05 17:29:18 +00:00
John Stiles
e61500059a Use SkBitSet for the work list, instead of a set<int>.
This provides an overall ~5% speedup in sksl_medium and sksl_large.
http://screen/9d992SKbYf7DzhW

Change-Id: Ia006a0b6b9f5d3d4e5b2298c64c491a4e04464c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322436
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>
2020-10-05 17:23:21 +00:00
John Stiles
03aa12b668 Minor improvements to SymbolTable::addWithoutOwnership.
These changes aren't on the critical path, so this doesn't lead to a
measurable speed boost, but this code does a bit less work in the
FunctionDeclaraction/UnresolvedFunction cases, and is flattened out a
bit for easier readability.

Change-Id: I105a1a0b1d02c9ec87f6f874437ddf1a53d9be0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322456
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>
2020-10-05 17:20:59 +00:00
Robert Phillips
52c17c43c7 Pull blur mask key creation into its own subroutine
draw_shape_with_mask_filter needs to be pulled apart and refactored to
support sharing the result of HW-generated blur masks with DDL recording
threads.

Change-Id: I4b03d5f0cbdd0f12e9740889159d9e91d7f8a060
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322397
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-05 17:12:00 +00:00
Brian Salomon
b497568aa8 In GrVkRenderTarget reset sk_sp instead of unref'ing underlying object
Change-Id: I1ee8900abff1d0b6a42f33d02cc37b8cc3946972
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322398
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-10-05 17:08:39 +00:00
Jim Van Verth
bd0881cb58 Revert "Remove use of legacy display globals."
This reverts commit c1916c34fe.

Reason for revert: Bots unhappy

Original change's description:
> Remove use of legacy display globals.
>
> In the ongoing effort to remove the display globals from Skia, allow
> their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
> in a normal Skia build and remove all use from Skia code.
>
> Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com

Change-Id: I365d2b1d19241a90130bc1b59663651817966f63
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322400
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-05 16:34:15 +00:00
Ben Wagner
c1916c34fe Remove use of legacy display globals.
In the ongoing effort to remove the display globals from Skia, allow
their use only if SK_LEGACY_SURFACE_PROPS is defined. Do not define this
in a normal Skia build and remove all use from Skia code.

Change-Id: I9ff550f5db246b9024aac687a1bc01321f1be4c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319343
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-05 15:53:10 +00:00
Brian Osman
00a8b5bb4f Revert "Revert "Convert sksl_frag.sksl to an IRIntrinsicMap""
This reverts commit 2d403f203b.

Change-Id: Idbcf128f170d17c371221e57ef05a5dc5e306e3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321777
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-05 14:44:14 +00:00
John Stiles
b16b29a9fe Create TinyUnorderedMap class for small-N data storage.
Our code relies on std::unordered_map for storage of unordered data.
Unfortunately, while unordered_map is algorithmically quite efficient,
in many real-world scenarios--particularly with small amounts of data--
a simple vector with linear search runs rings around it.

This CL doubles the performance of `nanobench -m sksl_large`:
http://screen/7uGYGLCaTtaHU4j

Change-Id: Ia2f6cedfac338876c2da57642e9b34addd85b683
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322320
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>
2020-10-05 14:40:14 +00:00
Kevin Lubick
750261f41a [canvaskit] Update npm to 0.18.0
0.18.1 should add docs
0.19.0 should remove Sk prefix

Change-Id: I21ef6e0735186bffc215a5855d3d53f405bde0fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322318
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-05 12:19:56 +00:00
Kevin Lubick
3d00e3a3fc [canvaskit] Flesh out remaining docs for core CanvasKit.
This adds docs or stubs for everything that is on the main CanvasKit
object.

Paragraph, Particles, and Skottie will be their own CLs.

Bug: skia:10717
Change-Id: I0f5027d73b2ac7d127f3a03a8f1aaa15f694ae38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321789
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-05 11:47:40 +00:00
Kevin Lubick
166d633c89 [canvaskit] Add docs/types for Font and related.
Paragraph will be its own CL.

Bug: skia:10717
Change-Id: I5c0d0ff40b500ec8f8eb74e7a44402a9e9548f8e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321519
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-05 11:47:23 +00:00
Kevin Lubick
a2535afd56 [canvaskit] Add docs/types for Path
Bug: skia:10717
Change-Id: I6096f69005fa78c3ad7e93082c088c2eb2ddd744
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321467
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-05 11:47:06 +00:00
Kevin Lubick
2fd08e651c [canvaskit] Add docs/types for Paint and Filters/Effects
This also includes matrices (which I'm reminded I want to test with
TypedArrays and make optional).

Bug: skia:10717
Change-Id: I0f6565a46b766c1f81c28dfc1229d403bff32e69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321118
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-05 11:46:38 +00:00
Kevin Lubick
97440de4b9 [canvaskit] Add docs/types for Canvas.
This is the object with the most APIs by far.

Some APIs are stubbed out temporarily and will be given more
detail in a follow-up CL.

Bug: skia:10717
Change-Id: Iff5d4269303e7102ad79de90f20640918f403ff4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320770
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-05 11:46:20 +00:00
skia-autoroll
43865d38f0 Roll Chromium from 1693b2839ab9 to 2cd17d78c985 (541 revisions)
1693b2839a..2cd17d78c9

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: Ib3b0d715c7d0b67a8ce2cc286c43e8b0a35bb448
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322280
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-05 05:03:43 +00:00
skia-autoroll
c909579b85 Roll SwiftShader from 375fee944c76 to b3c1e71eb1cb (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/375fee944c76..b3c1e71eb1cb

2020-10-02 nicolascapens@google.com Regres: List regressions before summary
2020-10-02 vantablack@google.com Added support for AndroidHardwareBuffer

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: I4bdf7beddb4a75657021fa143b22935b00edea2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322279
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-05 04:48:43 +00:00
skia-autoroll
e34a8d7f01 Roll ANGLE from 1fd3e5d89a8f to 500704812409 (18 revisions)
1fd3e5d89a..5007048124

2020-10-03 syoussefi@chromium.org Vulkan: Render pass creation cleanup
2020-10-03 syoussefi@chromium.org Vulkan: Free up 2 bits in PackedAttachmentOpsDesc
2020-10-02 jmadill@chromium.org Test Runner: Set interrupted to 'false' normally.
2020-10-02 jmadill@chromium.org Suppress flaky test on Win/Intel/GL.
2020-10-02 vantablack@google.com First pass at increasing inclusivity
2020-10-02 j.vigil@samsung.com Implement GL_OES_texture_stencil8
2020-10-02 jmadill@chromium.org Disable AMD OpenGL testing on Windows ANGLE tests.
2020-10-02 cclao@google.com Vulkan: Add a test and fix the bug with draw/invalidate/clear
2020-10-02 jmadill@chromium.org Skip ResizeWindowWithDraw test on all Linux.
2020-10-02 m.maiya@samsung.com Vulkan: Add OES_sample_shading extension entry points
2020-10-02 j.vigil@samsung.com EGL: Add stencil8 to configs
2020-10-02 syoussefi@chromium.org Vulkan: Fix unresolve disagreement between FB and RP
2020-10-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 0c0ac2c6c458 to 7c07085ad1cc (1 revision)
2020-10-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 7a78cc629cca to b588cd4df419 (4 revisions)
2020-10-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from c5c6265c026e to 14289452a832 (2 revisions)
2020-10-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 5e947adaf26e to 375fee944c76 (2 revisions)
2020-10-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 615fbe6cbc78 to d91afd8de27a (7 revisions)
2020-10-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 5efa84e265f7 to 7b91afe96128 (507 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC 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: angle_deqp_egl_tests
Change-Id: Ie6c3cd29ae448ac2b285608c52fd85250b0309e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322278
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-05 04:45:43 +00:00
skia-recreate-skps
b54ce23a7c Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Iff066b702366484b9f4f91d928877172cd780fc8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322216
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-10-04 15:33:27 +00:00
Harry Terkelsen
223ffcdff9 Add more paragraph bindings to CanvasKit
Change-Id: Ib02b6504724e4d7cfa197a3508f8c0b84b4135bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313146
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
Auto-Submit: Harry Terkelsen <het@google.com>
2020-10-04 12:56:57 +00:00
skia-autoroll
0f7242f28f Roll Dawn from 16ebcf601d7f to ed3a93f690de (1 revision)
https://dawn.googlesource.com/dawn.git/+log/16ebcf601d7f..ed3a93f690de

2020-10-02 senorblanco@chromium.org Fix rectangular mipmap textures used as color attachments.

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com,senorblanco@google.com
Change-Id: I648dfb37f37804a772fa80091f616cf54652fcf8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322116
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-03 15:27:07 +00:00
John Stiles
09b9eade20 Rename BlendOverlap to BlendOverlay.
Just a typo fix.

Change-Id: I2fe1f6ae1c99d7f20a4fa5f49eefea514e224652
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321977
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>
2020-10-02 22:26:15 +00:00
Brian Osman
58384ad0a7 Revert "moved SkSL Field data into IRNode"
This reverts commit 556b8bef61.

Reason for revert: TSAN (& ASAN?) bots unhappy

Original change's description:
> moved SkSL Field data into IRNode
>
> Change-Id: Ib119035466a9d5dbd870e5b4e22f45f3b56455c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321120
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

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

Change-Id: Ibc6b41c8cfc13d1d7fafc43ff643483da5a5f368
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321980
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-02 22:15:37 +00:00
Ethan Nicholas
556b8bef61 moved SkSL Field data into IRNode
Change-Id: Ib119035466a9d5dbd870e5b4e22f45f3b56455c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321120
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-02 21:54:25 +00:00
Ethan Nicholas
825268f99b fix SkSL dehydration
Fix a missing null check in SkSLAnalysis.cpp

Change-Id: Ifb976e79f93add9b7439d6b707bcee986f1284a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321936
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-02 21:11:34 +00:00
John Stiles
70957c8bc8 Fix indenting on InlineCandidateAnalyzer.
No code changes in this CL, only hundreds of lines of indentation fixes.

Change-Id: I780a0f93a61e567c4dca0e8b8d7066350569dc55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321795
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-02 21:05:54 +00:00
Brian Osman
a6ca9757d3 Let skslc use more of Skia's core
With these changes, SkTArray/SkSTArray can be used.

Change-Id: Ibf9a720086ac4342157a665786afac713d56c300
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321786
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-02 20:58:54 +00:00
John Stiles
2d7973afc2 Factor out Inliner candidate list assembly into its own function.
This greatly improves the output from a profiler. It makes it much
easier to determine how much time is spent in searching for candidates,
versus actually inlining them.

It also improves the code readability somewhat by breaking a large
monolithic function into several smaller functions.

Change-Id: I1b3ef6ddbe46af60e673f37ded766f8077ed6b03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321376
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-02 20:39:24 +00:00
Brian Osman
034f78a466 Detect non-2D textures in MetalCodeGenerator and fail cleanly
We were letting this get further, then asserting.

Bug: skia:10797
Change-Id: Iff6fe43aa32450b5a517c94773031d593f1f62a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321794
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-02 20:36:04 +00:00
Brian Osman
e8c2608ec6 Fixes to array handling and interface blocks
- Use a named constant for unsized array columns. Some places were using
  0, others were using -1. (It's now -1 everywhere).
- Fix dehydrate/rehydrate of unsized arrays.
- Change sk_in to be an unsized array - this matches the GLSL
  declaration (the size is implicitly the number of vertices per
  primitive). It also makes our use of sk_in where we index it not look
  like out-of-bounds access.

Change-Id: I64b9e81872ed71bcb691657d21b5713217b0b5e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321553
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-02 19:51:34 +00:00
Brian Salomon
86d07fd01c Remove unused SkImage YUVA factories.
Bug: skia:10632
Change-Id: Icb27e44d234063ab049fef95587f474323d7ada9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321537
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-02 19:35:34 +00:00
Florin Malita
71bcfef9f7 [skottie] Auto-resize and VAlign support for point text
Auto-resizing and vertical alignment require a non-empty text box.  But
currently, the presence of the text box is used to discriminate between
point text [1] and paragraph text [2].

In order to support auto-scaling and v-alignment for point text, we must
decouple the text mode encoding from the text box:

  * introduce and explicit LinebreakPolicy property for skottie::Shaper,
    and use it to control line breaking instead of the text box presence
  * by default, the line breaking policy is initialized per existing
    AE/BM semantics: non-empty text box -> paragraph mode,
    empty box -> point mode
  * the policy can be overridden via the PropertyObserver APIs to enable
    point mode auto-resizing and vertical alignment

[1] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_point_text
[2] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_paragraph_text

Change-Id: I007144283a31a2faa579d7eec82af72af3d540cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321788
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-02 19:33:35 +00:00
Greg Daniel
b509bbb81f Remove some unneed read access from vk srcAccessMasks.
There is not need to have read accesses list in the srcAccessMask of
barriers. This is cause the srcAccessMask is used to make writes to
memory available and reads obviously have no writes.

Change-Id: I2fb1eca04d6f216bc63e200ad36bacdb40bf8146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321785
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-02 19:21:04 +00:00
Ethan Nicholas
a3f22f1704 Revert "Revert "moved SkSL FloatLiteral data into IRNode""
This reverts commit a0c82f08df.

Change-Id: Ic2e93591c64992ec22e477bd0975d71954bef1c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321469
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-02 19:18:59 +00:00
John Stiles
6d69608621 Store a unique_ptr* for a candidate's parent statement.
This will later allow us to rescan parent statements independently,
instead of performing a full rescan of the entire Program on each
iteration.

Change-Id: Id86e139d81125bc529aba9453cba5606d1041908
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321462
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-02 19:00:14 +00:00
Greg Daniel
8cc5f19f43 Always bind input attachment to all pipelines in subpasses that uses one.
The vulkan spec says that if a subpass has an input attachment that the
input attachment descriptor set must be bound to all pipelines in that
subpass. This includes pipelines that don't actually use the input
attachment.

Bug: chromium:1134454
Change-Id: I9a544a9a457dde80d315010a626ae74eb422bb9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321779
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-02 17:42:34 +00:00
Greg Daniel
36366209d4 Require stencil bits on wrapped GrBackendRenderTargets to 0, 8, or 16.
This will allow us in a follow on change to put in a "fake" gl stencil
format for the wrapped FBO.

Bug: skia:10727
Change-Id: Iba1eca5114b34d25e6a220591d28a20f7b36b12b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321545
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-02 16:15:44 +00:00
Heather Miller
93f22bc46b Update release notes for M87 branch cut, M88 begin
Bug: skia:
Change-Id: Id4cc2f42389dac1e087026fee5c0df0eff4e89c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321776
Reviewed-by: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2020-10-02 14:36:34 +00:00
Kevin Lubick
7d96c5cdd3 [canvaskit] Fix computeTightBounds
I noticed it was broken and untested when writing docs.

Change-Id: I5254b7bd50fde8a361c72ccbd7380809d31ccc08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321464
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-02 14:06:24 +00:00
Greg Daniel
17b0c755b4 Remove unsized gl stencil support.
We don't believe this is needed anymore and was mostly here to support
old desktop GL

Bug: skia:10727
Change-Id: Iab35ec7d6ed64d817aed57c38864932cc417c68e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321541
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-02 13:21:14 +00:00
Robert Phillips
326f1d702b Accumulated non-substantive changes
Change-Id: I0c6f48da9acefcdd954c9b1b54501ef48465e537
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310980
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-02 12:59:54 +00:00
Brian Osman
2d403f203b Revert "Convert sksl_frag.sksl to an IRIntrinsicMap"
This reverts commit 3e40ce0937.

Reason for revert: Lots of bad Vk images from Pixel2/3

Original change's description:
> Convert sksl_frag.sksl to an IRIntrinsicMap
>
> Did some related cleanup:
> - We were setting the IRGenerator's fIntrinsics to the (empty) GPU map
>   while converting the GPU/frag/vert source. Make the IR generator
>   support a null intrinsic map, so we can (more correctly) structure the
>   compiler's constructor.
> - Use explicit types on all calls to findAndInclude.
> - Move the assert back into grab_intrinsics - every converted include
>   only contains supported elements (and will continue to do so).
>
> Change-Id: I80ebb247107dde656946858bf2cd1f50a03f67d3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321496
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I6f11366971bfd252f11d30c48e2e776d30458933
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321683
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-02 11:17:56 +00:00
skia-autoroll
4896b3369d Roll Chromium from 085332bfbb3a to 1693b2839ab9 (532 revisions)
085332bfbb..1693b2839a

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

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

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

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: brianosman@google.com
Change-Id: I2b63e0d2763a5815ad5e1e9154ed70bdecc082e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321650
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-02 04:53:08 +00:00
skia-autoroll
b62286fb62 Roll SwiftShader from 5e947adaf26e to 375fee944c76 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/5e947adaf26e..375fee944c76

2020-10-02 zzyiwei@google.com Use vndk/window.h instead of the system one
2020-10-01 swiftshader.regress@gmail.com Regres: Update test lists @ 5e947ada

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

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

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: brianosman@google.com
Change-Id: If92e2644c75129fbd626a7493be89035d8ccdbba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321649
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-02 04:51:49 +00:00