Commit Graph

50359 Commits

Author SHA1 Message Date
Brian Osman
9487e9b2a0 Revert "Implement dumpInfo for .fp files."
This reverts commit a1df23c8b7.

Reason for revert: Needs c++17 library as written

Original change's description:
> Implement `dumpInfo` for .fp files.
> 
> Change-Id: I40f6c1a02e194f090e67a0e3f2d7d83cd2317efd
> Bug: skia:8434
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309139
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

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

Change-Id: I09b98e83735bc30ec8a2e313e4b76a9eb6a7631a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8434
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309656
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-12 13:19:48 +00:00
Michael Ludwig
417f3a54fb Apply correct matrix to correct points in GrDashOp
The 'pts' coordinates should be transformed by the view matrix. We could
instead apply the inverse src rotation to ptsRot when determining the
perpendicular and parallel scales, but this is valid and straight
forward.

When determining the device segment lengths in onPrepare, we do need to
transform the ptsRot by fSrcInvRot (which includes the view matrix),
instead of just the view matrix.

This fixes the linked chromium bug, which drew a wider stroked dash
because on a perfect vertical, the rotation to a canonical x-axis
geometry would end up swapping perpendicular and parallel scale factors.

Bug: chromium:1113794
Change-Id: Ibc37f8a24688a76e0d0947b0c53c8bd13cd769cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309443
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-08-12 13:18:16 +00:00
John Stiles
a1df23c8b7 Implement dumpInfo for .fp files.
Change-Id: I40f6c1a02e194f090e67a0e3f2d7d83cd2317efd
Bug: skia:8434
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309139
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-12 13:08:46 +00:00
Florin Malita
7806794543 [skottie] Initial audio layer plumbing
Looking at audio layer support for Skottie, we need an API to
externalize audio asset loading and playback.

Similar approach to the other resource types for loading, but in
addition we also delegate playback control to the embedder.

First thought: keep it really simple and just emit seek() events.
Positive |t|s for track playback, negative for track off.

The embedder needs to implement state menagement (playing/not-playing)
and optional synchronization (if animation playback is not real time).

Change-Id: I54d1c2c39d0c38dd926f7c93764bde6695cb3fe2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309317
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-12 13:03:16 +00:00
skia-autoroll
9ca6a7f443 Roll ANGLE from 23335ac01cb8 to d667ad2f0127 (12 revisions)
23335ac01c..d667ad2f01

2020-08-11 cnorthrop@google.com Tests: Add Mobile Legends trace
2020-08-11 cnorthrop@google.com Capture/Replay: Allow starting capture at an unknown frame
2020-08-11 jmadill@chromium.org Perf Tests: Handle logError callback.
2020-08-11 ianelliott@google.com Vulkan: tell ContextVk when swapchain is re-created
2020-08-11 jmadill@chromium.org Vulkan: Optimize resource tracking in CommandBufferHelper.
2020-08-11 ynovikov@chromium.org Add tools/clang/dsymutil to roll_chromium_deps.py
2020-08-11 lehoangq@gmail.com Metal: Generate default shaders to separate files.
2020-08-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from b399fb08896a to fcfe5a3b19d5 (2 revisions)
2020-08-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 7b2dd11dda7a to 8e1380996d6a (3 revisions)
2020-08-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from 8446db62f194 to 6eaf979e7366 (1 revision)
2020-08-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 2de6d657dde3 to b60e067b4374 (2 revisions)
2020-08-11 lehoangq@gmail.com Metal: Init format table using Metal-Feature-Set-Tables.pdf

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 fmalita@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
Bug: None
Tbr: fmalita@google.com
Test: Test: Capture application frames using triggerTest: Test: angle_perftests --gtest_filter=TracePerfTest.Run/*mobile*Test: Test: angle_perftests, *vulkan_null_index_buffer_changed_ushortTest: Test: run_angle_perftests --gtest_filter=TracePerfTest.Run/vulkan_angry*:*vulkan_candy* --verbose --local-output
Change-Id: I3a5aab06116b2fbb08732cc9d7d0ff15186c798f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309596
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-12 05:05:36 +00:00
skia-autoroll
53fc464fea Roll dawn from cbec3179ef87 to 37f547456cc6 (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/cbec3179ef87..37f547456cc6

2020-08-12 enga@chromium.org Support depth-only/stencil-only copies on D3D12
2020-08-11 tommek@google.com Adding validation for requiredBytesInCopy overflow

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: Ibdb0e24ac04375e31cfc45e93ea4aa93844c0eb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309577
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-12 05:03:51 +00:00
skia-autoroll
7e7cae79f1 Roll SwiftShader from 59b4828f293e to 13f04d59c727 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/59b4828f293e..13f04d59c727

2020-08-11 sugoi@google.com Fix for dEQP-VK.wsi.*.swapchain.acquire.too_many_timeout
2020-08-11 capn@google.com Implement VK_EXT_depth_range_unrestricted
2020-08-11 sugoi@google.com Prevent accessing deleted ImageView objects

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 fmalita@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: fmalita@google.com
Change-Id: I67082bd89aa11b814e8c91c56d81f6ee27e00275
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309576
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-12 04:59:36 +00:00
skia-autoroll
fce37dedc3 Roll Chromium from 5246cdb214b3 to 7a75987d261a (417 revisions)
5246cdb214..7a75987d26

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 fmalita@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: fmalita@google.com
Change-Id: I1da960aea900d521fee5c7675fe79b5896dd3de4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309578
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-12 04:58:46 +00:00
Mike Klein
ab6f9ef34a don't use out of range float values in the test
These doubles are sometimes used as doubles and sometimes floats,
but it doesn't make sense to use values that can't be a float as one.
Just skip those in the test combinatorics.

Change-Id: Ibfdb699cac80b260258b164f95361110eb85c152
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309483
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-11 23:33:00 +00:00
Mike Klein
d4328567af allow all CPU surfaces
These should work fine through SkVMBlitter,
and I'm not really sure why we didn't add them
to SkRasterPipeline.

Bug: chromium:1113777
Change-Id: Id89f82e6a53bd49d88a9562309acf0ab53ea5ec5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309472
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-11 21:53:30 +00:00
Brian Salomon
864562faf4 Check for OOM in GrVkMemory
Change-Id: Ia6bc631596c5de3e8b3f634d5798fd1e76e8ddde
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309438
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-08-11 21:25:08 +00:00
Michael Ludwig
43d8d23693 Don't over simplify near-colinear vertices
This adds an error variable that keeps track of the total distance from
the simplified line, and includes it when determining if we should
keep the next point. Using a sum of line distance is just a heuristic
but seems to address the current case of over simplification while
allowing us to keep a greedy strategy.

Bug: chromium:1086705
Change-Id: I29e21724db6b30495c2934e376a5e4d787c846a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309328
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-08-11 21:18:58 +00:00
Julia Lavrova
73f003acfd Revert "ICU: SkShaper (bidi iterator only)"
This reverts commit 64e3d040e9.

Reason for revert: Breaking google3

Original change's description:
> ICU: SkShaper (bidi iterator only)
> 
> Change-Id: I845cc0a962790ce37600f943473f21f619ee029b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308508
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

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

Change-Id: Ib081d97f61e57f74bb9414b3973cca640f3b3929
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309442
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-08-11 21:06:10 +00:00
John Stiles
4ed6947787 Avoid recomputing the input texel colors in Processor tests.
Profiling showed that repeated calls to `input_texel_color` were
actually a very expensive part of the test. Fortunately, we can expose
the texture's pixel buffer to the unit test method and easily reclaim
that performance.

Change-Id: I2c1cdd57a3e14dc859bdf03d8131137ca81364ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309437
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-08-11 20:37:38 +00:00
Leon Scroggins III
4f4be9bd4b GrVkTypes: Change externalFormat to be uint64_t
This matches the Vulkan type. This also fixes a warning when comparing
to another uint64_t.

Update GrVkSamplerYcbcrConversion::Key to match as well.

Change-Id: I6fc5d9456ee466dc3d98240acf935139a7808a02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309325
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-08-11 20:33:18 +00:00
Mike Klein
ed93e5e810 add SkRRect::readFromMemory() fuzzer
Change-Id: I2102056847efe9e56ba6e8150e0d451bffc8f204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309378
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-11 20:26:28 +00:00
Mike Klein
b64a26c42e robustify SkScaleToSides::AdjustRadii()
The fuzzer has a found a pathological case where the maxRadius
needs to be reduce by 17 ulps.

Reduce the larger radius an ulp at a time until the sum fits.

Change-Id: I9cc4528667e7f9e902eff34d447fd4040a09742e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309417
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-11 20:08:38 +00:00
John Stiles
ddefaee2c2 Update the inliner's variable mapper to use unordered_map.
There's no ordering between elements that we need to maintain, so
there's no reason to use a collection that maintains an ordering.

Change-Id: Ic5b71d84578eaf3dc3503a0fe5064146302120d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309416
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-08-11 20:01:18 +00:00
Julia Lavrova
64e3d040e9 ICU: SkShaper (bidi iterator only)
Change-Id: I845cc0a962790ce37600f943473f21f619ee029b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308508
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-08-11 19:58:08 +00:00
Elliot Evans
1a4107a32a Add path rendering performance demo to demos.skia.org
In this demo the user may choose between one of three path rendering methods
    1. SVG
    2. Canvas2D Path2D API
    3. CanvasKit

SVGs is animated using css transforms on the main thread, while Canvas2D and CanvasKit are animated
in a worker using OffscreenCanvas.

While the user views the result of the rendering, the demo collects framerate data and displays it
so the user may compare the performance of the three methods.

Change-Id: I8cd6e079bab8815614e09a276cfe78bee9557fda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309327
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-11 19:57:08 +00:00
Adlai Holler
c41ae2a3cf Reland "Migrate MakeCrossContextFromPixmap to GrDirectContext"
This reverts commit ae04cc9099.

Reason for revert: Flutter g3 roll complete

Original change's description:
> Revert "Migrate MakeCrossContextFromPixmap to GrDirectContext"
> 
> This reverts commit 066f7d6b1a.
> 
> Reason for revert: Cant land until flutter PR 20235 reaches g3
> 
> Original change's description:
> > Migrate MakeCrossContextFromPixmap to GrDirectContext
> > 
> > This function isn't used by Chrome so we migrate directly.
> > Flutter migration is at https://github.com/flutter/engine/pull/20235
> > 
> > Bug: skia:104662
> > Change-Id: I9d875acdbd162f50a6d86b3a4cae3f400e4dd38f
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305180
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
> 
> Change-Id: I100a87075ffdf5c0cda78c95f1cfe3310f97630e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:104662
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308501
> Reviewed-by: Adlai Holler <adlai@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>

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

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

Bug: skia:104662
Change-Id: I32e36aa1c70902296e7f28d0f8b52d4e55b264a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309320
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-08-11 19:53:06 +00:00
John Stiles
ba1879d9f1 Add dumpTreeInfo debug method to GrFragmentProcessor.
This is a net reduction in code size because this idea was already
implemented separately in two places:
- dump_fragment_processor_tree (GrProcessorSet)
- describe_fp (ProcessorTest)

This consolidates the implementations. This CL also fixes a handful of
dumpInfo() methods that were not sufficiently descriptive--e.g. the FP
name was missing, or the implementation was just buggy.

Change-Id: If34ac46c97e9ae431c7c64b1247fc619703580b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309324
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-11 18:27:46 +00:00
Jorge Betancourt
a70445f408 reland: configure attributes for SkottieView to be initialized from XML layout
Original CL: https://skia-review.googlesource.com/c/skia/+/301716

Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301716
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Change-Id: I30b782fb6c3edfb6552ed733bd1948bda5f6b0b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308717
2020-08-11 17:31:56 +00:00
Herb Derby
1fbb331bbb use SkIPoint for positions in GrTextBlob
Instead of using SkPoint to store position information,
we can constrain the position information to be integers.
This will lead to two future improvements.
  * Shrink position information to SkIPoint16
  * Use integer arithmetic instead of floating point
    in vertex calculation.

 I'm interested in feedback on the comment which describes
 the math behind this technique.

Change-Id: I8441bcbcad99d07e6d6d5e1788d1a47d87f22923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306948
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-11 16:55:25 +00:00
Brian Salomon
86c272aa65 Remove Adreno must-do-copies-from-origin workaround
This old workaround causes us to disable transfer-from support
which in turn hurts "async" read pixels perf by falling back
to synchronous reads.

This workaround was relevant to early Vulkan drivers circa 2016.

Bug: chromium:1113233

Change-Id: Ie4d78b483700144809f829373c10224f5ede85ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309316
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-08-11 15:55:35 +00:00
Robert Phillips
a4bb064630 Non-substantive changes to small path rendering classes
These would just distract from the core of the upcoming review

Change-Id: Iaf9fa2d45ad0059a184491e8d66cc73672f1d368
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309284
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-11 15:46:15 +00:00
Brian Salomon
37bc135015 Remove incorrect 1 pixel opt. in GrInterpretFilterQuality.
The area calculation can cause overflow, though worst case
scenario is incorrect drawing.

This doesn't seem like an important optimization. Also it's
not correct for decal tile mode.

Bug: chromium:1112139

Change-Id: I4365c6b39f1190a9102cc76d3de1ef9ed0ece356
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309282
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-08-11 15:38:45 +00:00
John Stiles
640c5506c8 Fix implementation of SkDEBUGFAILF in SkSL.
This wasn't used anywhere yet, so the omission of `fmt` went unnoticed.

Change-Id: I6f5899c31b91ff04240de735fd3f9ef5b6da227e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309179
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-08-11 15:37:35 +00:00
Brian Osman
49983ef4e7 Runtime effect: Gather uniforms in one pass
Change-Id: I30c4f0a1d13ac49247bab36cfb5dae1dbccbf348
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309283
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-11 14:24:06 +00:00
Jim Van Verth
765c5928ef MSAA improvements for Direct3D.
* Fixes quality value
* Enables grabbing sample positions
* Enables centering samples for non-hardware AA

Change-Id: I5cabc0804b4a57347b7072b100c17310155c0ebc
Bug: skia:10476
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308798
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-11 14:21:05 +00:00
Robert Phillips
5edf510941 Add plumbing for access to the flush-time GrSmallPathAtlasMgr
This isn't connected to anything yet and parallels what is done
for the text GrAtlasManager.

The rough pattern is that the GrContext hierarchy implements creating
the atlas but it is only exposed/made available via the flush state
(which derives from GrDrawMeshOp::Target).

TBR=bsalomon@google.com
Bug: 1108408
Change-Id: Iad7b5648877dbd20840e8d47c1d24131098ded94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309128
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-11 12:53:55 +00:00
Adlai Holler
cf0d08e149 Revert "Migrate GrSurfaceContext readPixels to take direct context"
This reverts commit d169e1915c.

Reason for revert: broke chrome via code generator

Original change's description:
> Migrate GrSurfaceContext readPixels to take direct context
> 
> After this lands we'll proceed up the stack and add the direct
> context requirement to the public API and SkImage.
> 
> Bug: skia:104662
> Change-Id: I4b2d779a7fcd65eec68e631757821ac8e136ddba
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309044
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I6126f2dca4bc902c903512ac486e22841cc472e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:104662
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309281
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-08-11 12:36:27 +00:00
Robert Phillips
109ff207de Tweak GrSmallPathAtlasMgr's cached path discovery methods
In an ideal world we wouldn't keep re-allocating the memory for the keys

Change-Id: I3b7954e131d483166d0bf0ce95510365869b134c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309123
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-11 12:16:25 +00:00
skia-autoroll
bb67d54f93 Roll ANGLE from 48ba75ac6845 to 23335ac01cb8 (21 revisions)
48ba75ac68..23335ac01c

2020-08-11 ynovikov@chromium.org Roll chromium_revision ed7912a248..c8c2c64629 (794870:796654)
2020-08-11 ynovikov@chromium.org Fix clang revision regexp in chromium autoroller to match new format
2020-08-11 jmadill@chromium.org TestRunner: Fix test result handling.
2020-08-11 ynovikov@chromium.org Skip WebGL2CompatibilityTest.CopyMip1ToMip0 on Mac Intel GL
2020-08-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from f881f08358b0 to 2de6d657dde3 (2 revisions)
2020-08-11 ynovikov@chromium.org Suppress dEQP-GLES3 failures on D3D11 NVIDIA
2020-08-10 jmadill@chromium.org Vulkan: Remove TODO.
2020-08-10 jmadill@chromium.org Vulkan: Refactor image dependency commands.
2020-08-10 nguyenmh@google.com Invalid calls' pointer params are no longer captured
2020-08-10 jonahr@google.com Enable required extensions for Chromium to use the Metal backend.
2020-08-10 nguyenmh@google.com Implement param capture for glGetUniform calls and extensions
2020-08-10 lehoangq@gmail.com Metal: Implement CHROMIUM_copy_texture
2020-08-10 nguyenmh@google.com Update readme with how to run regression testing script
2020-08-10 nguyenmh@google.com Change test result types + add additional logging
2020-08-10 timvp@google.com Disabling failing dEQP-GLES2.functional.fbo.render.recreate_* tests
2020-08-10 jmadill@chromium.org Vulkan: Simpify check for started RenderPass + FB.
2020-08-10 nguyenmh@google.com Use striping when making test batches
2020-08-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from aba3ab0ce72f to 61bf3be73c1e (1 revision)
2020-08-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from a1c21580f50b to 1590d46aaaeb (3 revisions)
2020-08-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 9ba1bc28d878 to b399fb08896a (2 revisions)
2020-08-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from a6d08c75d219 to 8446db62f194 (4 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 fmalita@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
Bug: chromium:1104516,chromium:1112800
Tbr: fmalita@google.com
Test: Test: dEQP-GLES2.functional.fbo.render.recreate_*
Change-Id: Ia6845ea3dd10a390f133ffa113392fb2c309a587
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309257
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-11 04:43:35 +00:00
skia-autoroll
3ed91946e2 Roll dawn from 1662e97f324e to cbec3179ef87 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/1662e97f324e..cbec3179ef87

2020-08-10 natlee@microsoft.com Implement Queue::WriteTexture in D3D12
2020-08-10 rharrison@chromium.org Roll 3 dependencies
2020-08-10 brandon1.jones@intel.com Re-add heap usage tracking for textures in a pass

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from 2de6d657dde3 to b60e067b4374

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

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

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

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I31c2c46bdb96f6ef3bf7bda21ca8b1d07d6915ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309243
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-11 04:43:34 +00:00
skia-autoroll
f64194d1ef Roll Chromium from 4430c2c58af2 to 5246cdb214b3 (398 revisions)
4430c2c58a..5246cdb214

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 fmalita@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: fmalita@google.com
Change-Id: I7f3fd3fdfead9b1cfc5cee265fca4a597cbabdaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309256
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-11 04:36:34 +00:00
Brian Osman
a4b9169fb6 Remove 'in' variables from SkRuntimeEffect
Runtime effects previously allowed two kinds of global input variables:
'in' variables could be bool, int, or float. 'uniform' could be float,
vector, or matrix. Uniform variables worked like you'd expect, but 'in'
variables were baked into the program statically. There was a large
amount of machinery to make this work, and it meant that 'in' variables
needed to have values before we could make decisions about program
caching, and before we could catch some errors. It was also essentially
syntactic sugar over the client just inserting the value into their SkSL
as a string. Finally: No one was using the feature.

To simplify the mental model, and make the API much more predictable,
this CL removes 'in' variables entirely. We no longer need to
"specialize" runtime effect programs, which means we can catch more
errors up front (those not detected until optimization). All of the API
that referred to "inputs" (the previous term that unified 'in' and
'uniform') now just refers to "uniforms".

Bug: skia:10593
Change-Id: I971f620d868b259e652b3114f0b497c2620f4b0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309050
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-08-10 22:00:44 +00:00
Adlai Holler
d169e1915c Migrate GrSurfaceContext readPixels to take direct context
After this lands we'll proceed up the stack and add the direct
context requirement to the public API and SkImage.

Bug: skia:104662
Change-Id: I4b2d779a7fcd65eec68e631757821ac8e136ddba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309044
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-10 21:54:04 +00:00
John Stiles
9fbe9e9453 Reduce processor tree depth back to 1.
This is causing failures on the status dashboard.

Change-Id: I29e8fb5bef72282dbe6fafb5402607ed48aae707
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309136
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-08-10 21:11:04 +00:00
Greg Daniel
0952991c42 Fix vulkan render pass ctor.
This fixes the asan failures on the bots

Change-Id: I1baaf5596714262f7e3ddf368bb38b91b1ffcfcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309054
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-08-10 20:49:24 +00:00
John Stiles
02b1128b03 Replace SkSL string macros with inline constexpr char arrays.
C++17 introduced `inline constexpr` as a mechanism for declaring strings
in headers safely without macros. See https://abseil.io/tips/168

Change-Id: I68071fbadebf32753ca4a0586b96e32634083f6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309047
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-10 19:55:14 +00:00
Robert Phillips
5b68ed4c51 Remove GrStyledShape.h from GrSmallPathShapeData.h
This refactoring was requested during an earlier code review.

Change-Id: I93184e2bc936b3c8c69f84e475be2c234845ee81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309120
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-10 19:48:14 +00:00
John Stiles
2cc126fc74 Update ProcessorCloneTest to use a processor tree depth of 3.
Opted the Galaxy S20 out of the test to allow Tryjobs to pass.

Change-Id: I8d4637a23f36edb012c96b7059b184c231c0436d
Bug: skia:10384, skia:10595
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309119
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-10 19:31:54 +00:00
John Stiles
87d0a2fa53 Update MakeChildFP to allow processor hierarchies to be created.
Previously, MakeChildFP avoided infinite recursion by rejecting any FP
that took inputs. MakeChildFP now generates random inputs up to a
user-supplied tree depth.

The ProcessorOptimizationValidationTest test has been updated to
test up to a tree depth of 3. The ProcessorCloneTest has been left at
a tree depth of 1 due to a bug that only appears on Galaxy S20/Mali G77.
The Mali bug doesn't appear to be related to FP cloning, but probably
deserves further analysis. (It appears that on this device, these
processors hooked together in sequence render a tiny bit differently
each time: DitherEffect -> RectBlurEffect -> ImprovedPerlinNoise. By
visual inspection it looks like the dither varies on each draw.)

Change-Id: Ib8f619eb7a8a9c9254080303504c20065ff35453
Bug: skia:10384, skia:10595
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308556
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-10 19:27:44 +00:00
Robert Phillips
46a324a16c Move GrSmallPathAtlasMgr to its own file and out-line
There are no intentional behavioral changes in this CL. It should
purely be cut, paste, re-shuffle & get re-compiling.

Bug: 1108408
Change-Id: Ic8457d0af76861f2ea881177f2b2c0fe0bf85146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309040
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-10 18:05:54 +00:00
John Stiles
c45f0cfce0 Update style guidance for [[fallthrough]].
We now use compiler-enforced fallthrough annotations.
(http://review.skia.org/296938)

Change-Id: Ia02e0f6147118f7b388315341ed41f60c53b429c
No-Try: true
Docs-Preview: https://skia.org/?cl=309045
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309045
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-10 17:56:56 +00:00
Robert Phillips
3262bc8f66 Clarify that the GrDirectContext uniquely holds the text atlas manager
Bug: 1108408
Change-Id: Iad0b634a8a0d6dac64e3571a32e755d124401f66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309077
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-10 17:23:54 +00:00
John Stiles
ea8be2120e Update ProcessorClone test to re-verify problems without using clone().
Previously, this test would synthesize a random FP, call clone(), render
both, and the compare the results and report differences.

Now, if a difference is discovered, this test will re-synthesize the
originally-created random FP from scratch without using clone().
Instead, we call TestCreate again using the same random seed.
Then we can render and compare that output against the original as well.
This will allow to better differentiate failures that were actually
caused by clone(), versus failures caused by other types of
inconsistency.

If the regenerated version still mismatches, there are a variety of
potential explanations:
- the FP's TestCreate() does not always generate the same FP from a
  given seed
- the FP's Make() does not always generate the same FP when given the
  same inputs
- the FP itself generates inconsistent pixels (shader UB?)
- the driver has a bug

Change-Id: I71701c0f3d33a08f6ee926313782620487d336bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309076
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-10 16:45:53 +00:00
Greg Daniel
b418921133 Add plumbing for dst read render passes into GrVkRenderPass.
This is essnetially the middle set of work to fully optimize dst reads
in vulkan. On the upper end we still need to get the knowledge of dst
reads from the GrProgramInfo. And on the lower side we need to actually
create the render pass and correctly use it vulkan. This change is
essentially adding the plumbing that will sit between those two parts.

Bug: skia:10409
Change-Id: I58ebdc6574a9bdeddc3658f56b0a7b43f28473e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308765
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-10 16:30:24 +00:00
John Stiles
fb9f2e94ad Add style guidance for k prefix on constants.
The style guide only mentioned the `k` prefix for enums, but it is
also used throughout Skia for constant values.

Also removed guidance about using anonymous enums to declare an
integral constant. static constexprs should be preferred here.

Change-Id: I2f7d4d375cc914d4efb9fe60fbd90ddaaf8c1b69
No-Try: true
Docs-Preview: https://skia.org/?cl=308919
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308919
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-10 16:09:55 +00:00