Commit Graph

48306 Commits

Author SHA1 Message Date
Kevin Lubick
e70af51c1a [canvaskit] Properly fix Safari (detect if WebGL2 is not available)
I believe we had incorrectly been using the wrong emscripten-provided
helper to make our WebGL contexts. Thus, the parameter that was
specifying webGL 1 vs 2 was not getting properly passed in
(I believe because of a closure-induced problem in minification).

I validated this build on my local Mac+Safari test harness.

Bug: skia:10171
Change-Id: Ifd5e55a6b64407bf84168e118d8dda4738ef5487
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289885
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-05-14 19:15:25 +00:00
Ethan Nicholas
ff350cb9db fixed null dereference in SkSLMetalCodeGenerator
Bug: oss-fuzz:21999
Change-Id: I156e5015570394104796380455366bbeb31181a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287385
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-05-14 18:36:53 +00:00
Herb Derby
79c5674a4c Place transformed drawing data at source space (0,0)
The direct device remains fully positioned,
and will be addressed in a following CL.

This is a step towards making the vertex data
constant. The path data is positioned at draw
time instead of at creation time.

The GPU data is not constant at this time, but
when all the vertex data is placed at (0,0) the
data can be const.

Bug: skia:10251

Change-Id: I24991e1ba76ab77f06bf040d88de93bc31002b31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289880
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-05-14 18:29:53 +00:00
Stephen White
dbb3e1dc2e Remove some asserts that prevent Dawn from completing a DM run.
Dawn does not support readback from a bare render target, so it will
continued to fail those tests. But it should fail without dm halting
execution.

Change-Id: If7955106d5dbb4eaea86af58de96bcc7e74aac85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288902
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-05-14 17:15:23 +00:00
Mike Klein
b8fc4e6176 refactor SkArenaAlloc arrays a little
Change-Id: I746424ea6bf324e9841161c28a94527e07803653
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289825
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-05-14 15:45:03 +00:00
Greg Daniel
39ec60aa83 Don't delete gl textures on failed update.
Change-Id: I5bea5e845c5098c8885a75cf9602a1231dbee3ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289785
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-14 15:09:22 +00:00
Kevin Lubick
c2e80e132e [canvaskit] Disable getError calls for webGL
getError is known to be problematic for performance on Chrome
because it is synchronous. Disabling this should improve
performance in several cases.

Change-Id: I0d4a68ddb9625f09d7427e3c5f36883352c4f995
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289779
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-14 14:48:21 +00:00
Kevin Lubick
0c8884b6b4 [canvaskit] Fix memory leak in paragraph bindings
This also renames some variables to be consistent.

See https://github.com/flutter/flutter/issues/56938

Change-Id: I0db66fa334d5f5efc1f94fff1a367a32e03611ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289778
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-05-14 14:48:21 +00:00
Herb Derby
8f3963f281 Add array initializer
Generate an array with initialized values based on
a function of the index.

Change-Id: I1d7d83ba9cacde47b8c736f26dedc15294929937
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289489
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-05-14 14:34:12 +00:00
Jim Van Verth
682a2f4de6 Add Direct3D swapchain support
Change-Id: I4d4025fb842eb937785509bc7947f85f28a98ab8
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288551
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-05-14 14:23:02 +00:00
Heather Miller
5b2ede3d0d Update Skia milestone to 85
Change-Id: If6f878b896397ec1946a0b29b10764722b35d737
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289777
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
2020-05-14 11:51:46 +00:00
skia-recreate-skps
c1baf6e1c2 Update Go Deps
Change-Id: Ie2c24821e2a13f174e05bce891ae5e2db665d3d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289723
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-14 05:42:22 +00:00
skia-autoroll
a263d9b852 Roll third_party/externals/angle2 3b82fdcf1c83..664376e20ab2 (10 commits)
3b82fdcf1c..664376e20a

git log 3b82fdcf1c83..664376e20ab2 --date=short --first-parent --format='%ad %ae %s'
2020-05-14 sunny.sun@arm.com Vulkan: Fix performance issue
2020-05-14 timvp@google.com Check noopDraw() before prepareForDraw()
2020-05-13 spang@chromium.org Add a test for mandatory Fuchsia handle types
2020-05-13 spang@chromium.org Apply compression algorithm to VulkanExternalImageTest
2020-05-13 spang@chromium.org Reland "Vulkan: Add semaphores test to VulkanExternalImageTest"
2020-05-13 cnorthrop@google.com Capture/Replay: Fix MEC crash with Temple Run
2020-05-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 55f9d97f3b1e..4fa68edd6819 (1 commits)
2020-05-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader d9ba4b7dd30b..64da65bd1bd5 (1 commits)
2020-05-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src fe0b6a61d732..73680f59c04a (13 commits)
2020-05-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src c8590c18bd0c..63fa9114a931 (1 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@664376e20ab2

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 jlavrova@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/+/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: jlavrova@google.com
Change-Id: I5ed1f5a5ec5c7dc633a527ba42120af5d44e9e86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289717
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-14 04:47:52 +00:00
skia-autoroll
c8ea7179ea Roll ../src e334ec41436b..a6a8a49a2077 (501 commits)
e334ec4143..a6a8a49a20


Created with:
  gclient setdep -r ../src@a6a8a49a20

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 jlavrova@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/+/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
Bug: None
Tbr: jlavrova@google.com
Change-Id: Ib9a2663b01690cab0da7187439a827a1e676c3f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289695
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-14 04:43:12 +00:00
skia-autoroll
adc35ec7d5 Roll third_party/externals/dawn f4df7916cacb..75ef5963b477 (8 commits)
https://dawn.googlesource.com/dawn.git/+log/f4df7916cacb..75ef5963b477

git log f4df7916cacb..75ef5963b477 --date=short --first-parent --format='%ad %ae %s'
2020-05-13 enga@chromium.org Append the stack trace to the error message
2020-05-13 cwallez@chromium.org Remove wgpu::BufferCopyView::rowPitch/imageHeight
2020-05-13 cwallez@chromium.org Remove ShaderModule::code/codeSize
2020-05-13 cwallez@chromium.org Remove wgpu::Device::CreateQueue
2020-05-13 cwallez@chromium.org Remove wgpu::BindGroupLayoutEntry::textureDimension
2020-05-13 cwallez@chromium.org Remove deprecated "Binding" types and members
2020-05-13 xilefmai@gmail.com D3D12: Add a toggle to use DXC for HLSL compilation
2020-05-13 cwallez@chromium.org Fix remaining -pedantic warnings.

Also rolling transitive DEPS:
  https://chromium.googlesource.com/chromium/src/third_party/jinja2 b41863e42637..b41863e42637
  https://chromium.googlesource.com/chromium/src/third_party/markupsafe 8f45f5cfa000..8f45f5cfa000
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang 4fa68edd6819..4fa68edd6819
  https://chromium.googlesource.com/external/github.com/google/shaderc 00ac5d82178c..00ac5d82178c

Created with:
  gclient setdep -r third_party/externals/dawn@75ef5963b477

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/+/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I3df499736304d09891a0ea7d6535392472d727fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289716
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-14 04:40:12 +00:00
skia-autoroll
412afeb360 Roll third_party/externals/swiftshader 64da65bd1bd5..d748e1651af8 (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/64da65bd1bd5..d748e1651af8

git log 64da65bd1bd5..d748e1651af8 --date=short --first-parent --format='%ad %ae %s'
2020-05-13 sugoi@google.com Fix missing border update after Image blit
2020-05-13 jonahr@google.com Wrap Xcb reply call for error handling

Created with:
  gclient setdep -r third_party/externals/swiftshader@d748e1651af8

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 jlavrova@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jlavrova@google.com
Change-Id: I4e6f2f8994c0f977bfcd4919868becc82c3e536d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289718
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-14 04:34:52 +00:00
Chris Dalton
f6bf516926 Reland "Add an implementation and log2 variants for Wang's formula"
This is a reland of e278e1c1c7

Original change's description:
> Add an implementation and log2 variants for Wang's formula
>
> Wang's formulas for cubics and quadratics (1985) tell us how many line
> segments a curve must be chopped into when tessellating. This CL adds
> an implementation along with optimized log2 variants, as well as tests
> and a benchmark.
>
> Change-Id: I3f777b8d0312c57c3a1cc24307de5945c70be287
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288321
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com

Change-Id: Ie3822c62439fc579a59ea8adb49583224de41aa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289680
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-05-14 02:57:59 +00:00
Mike Klein
e253a7c183 not all bots have env
That's okay, that's really just me being pedantic anyway.

Change-Id: I45a0f6b4866daff752169304da171c223016cac8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289685
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-05-14 02:02:18 +00:00
Chris Dalton
7156db2602 Revert "Update GrTriangulator to use SkPathPriv::Iterate"
This reverts commit 64964bb115.

Reason for revert: Iter does not behave the same as RawIter

Original change's description:
> Update GrTriangulator to use SkPathPriv::Iterate
> 
> Change-Id: I0998f22e3ce958fd651c359c930a2e48af27ce73
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285985
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com

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

Change-Id: I3387f95a966d18d2262c1a6b534c61c46e4a8b4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288662
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-05-14 01:12:08 +00:00
Chris Dalton
2f2d81c434 Fix tessellation benchmarks to not allocate new data every iteration
Change-Id: I86bb6f2690ad349e640ea997e0b71387613ebffb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289460
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-05-14 00:28:43 +00:00
Greg Daniel
dbe7770afc Blacklist failing vulkan test on s20.
Bug: skia:10247
Change-Id: I127509e8370f84e4fc40003232a93bb079e85576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289630
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-05-13 23:11:53 +00:00
Mike Klein
be72c44ec3 S20 vk?
- add back recently removed jobs
 - cp /vendor/lib64/egl/libGLES_mali.so to /data/local/tmp/libvulkan.so
 - use LD_LIBRARY_PATH to prefer libs in /data/local/tmp

Bug: skia:10184
Change-Id: I52524819c60abab1334c04530a7b13f0519db463
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289636
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-05-13 22:23:43 +00:00
Mike Klein
6c3db04c8b Revert "Add an implementation and log2 variants for Wang's formula"
This reverts commit e278e1c1c7.

Reason for revert: i think we need to do that add with an unsigned, or test instead of always += (1<<23)-1.

Original change's description:
> Add an implementation and log2 variants for Wang's formula
> 
> Wang's formulas for cubics and quadratics (1985) tell us how many line
> segments a curve must be chopped into when tessellating. This CL adds
> an implementation along with optimized log2 variants, as well as tests
> and a benchmark.
> 
> Change-Id: I3f777b8d0312c57c3a1cc24307de5945c70be287
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288321
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com

Change-Id: I24dfd8549054b632f38f7b05b4d857b640cf5cd1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289658
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-05-13 22:10:47 +00:00
Greg Daniel
b2365d81d0 Reland "Reland "Add api on GrContext to update the data of GrBackendTextures.""
This reverts commit ed219fe171.

Reason for revert: relanding with fix

Original change's description:
> Revert "Reland "Add api on GrContext to update the data of GrBackendTextures.""
> 
> This reverts commit 83c6626946.
> 
> Reason for revert: technospark is failing to upload pixmaps to non base mip levels
> 
> Original change's description:
> > Reland "Add api on GrContext to update the data of GrBackendTextures."
> > 
> > This reverts commit 93ca54e0ac.
> > 
> > Reason for revert: relanding with fix
> > 
> > Original change's description:
> > > Revert "Add api on GrContext to update the data of GrBackendTextures."
> > > 
> > > This reverts commit ac09f7cd7a.
> > > 
> > > Reason for revert: breaking bots, may need to use swizzled color for
> > > correctness test
> > > 
> > > Original change's description:
> > > > Add api on GrContext to update the data of GrBackendTextures.
> > > > 
> > > > Change-Id: I680f12bf58fc7b66a6b2f3fa4c4723ae84d3f949
> > > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288555
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > > 
> > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> > > 
> > > Change-Id: I47f41f536619ac13ca3ceeb216e7eaed9a9af255
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288630
> > > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > 
> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> > 
> > # Not skipping CQ checks because this is a reland.
> > 
> > Change-Id: I82283b2437e523b80acead71c5f7c651180620db
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288631
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
> 
> Change-Id: I5d6614db8db59a69ded511726507a186596cfbd4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288907
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

# Not skipping CQ checks because this is a reland.

Change-Id: I35fa1ae7dc47a697bbc358655f5c821942033234
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288909
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-13 21:49:25 +00:00
Stephen White
7a02614cba Make staging manager lists private to GrGpu.
Use const accessors for iterating.
Move platform-indepenent work to GrGpu::disconnect().

Change-Id: I0acabb5b5fd27ddb47f4051f956ce8130174a8d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282267
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-05-13 21:47:19 +00:00
Greg Daniel
7bd13c2bd1 Pass externally synchronizaed flag to vulkan memory allocator.
Change-Id: Iea561e5105ff46eda8fafe89b068bca6e7d1a523
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289621
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-13 21:44:43 +00:00
Chris Dalton
e278e1c1c7 Add an implementation and log2 variants for Wang's formula
Wang's formulas for cubics and quadratics (1985) tell us how many line
segments a curve must be chopped into when tessellating. This CL adds
an implementation along with optimized log2 variants, as well as tests
and a benchmark.

Change-Id: I3f777b8d0312c57c3a1cc24307de5945c70be287
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288321
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-05-13 21:39:24 +00:00
Adlai Holler
dcfb233858 Enable kernel caching in GrMatrixConvolutionEffect
Bug: skia:10233
Change-Id: I7a68cbb44c786a113c0f324e21ed963e8f47f382
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289492
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-13 19:51:13 +00:00
Brian Salomon
1908bb8e3a Add workaround for TecnoSpark 3 Pro MIP mapping
Change-Id: Ic882fce33fcb005c26c9746c6affdd7b92bcd559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-05-13 19:20:33 +00:00
Greg Daniel
5ab94e1ae6 Add GrContext getter to SkSurface.
Currently this is possible by getting the canvas off of surface and then
getting the context off of the canvas. However, if in the future we wanted
a surface that didn't have a canvas (maybe something that looked like a
mutible image that only had a writePixels call), this would allow us to
still get the GrContext.

Bug: skia:10118
Change-Id: Ie8504bb708c1e4532edc8c7832ead86ae711e237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289479
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-13 19:09:05 +00:00
Michael Ludwig
c002d5619e Simplify GrClip::getConservativeBounds() signature
It turns out no one was using the intersection of rect functionality on
GrClip, and this helps simplify what the new clip stack needs to define.

Bug: skia:10205
Change-Id: If85a0c744dd68a8ad2f380b54a539ac74850e4ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289440
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-13 18:59:13 +00:00
Brian Osman
7190399725 SkRuntimeEffect: Support late bound uniforms in raster
Supports marked matrices and srgb_unpremul colors

Change-Id: Icabd329758ac0a12ee323d73724d68c7927106c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289242
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-05-13 18:52:23 +00:00
Greg Daniel
da50cb84a4 A flush and submit apis to public headers.
We add a new flushAndSubmit() to replace the current flush() call. In
the future all other flush(GrFlushInfo) type calls will not do a
submission of work to the GPU. Instead an explicit submit call will have
to be made. flushAndSubmit will do a flush and submit.

Also adds a no-op submit call. This allows us to stage the flush submit
changes by updating all clients that use non simple flushes to add
a submit call immediately after each flush. Then we can change the logic
of where the submission happens from flush to submit without breaking
folks.

Bug: skia:10118
Change-Id: I4f02189a21912d52b888597c7734b4ca0baee792
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289478
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-05-13 18:43:54 +00:00
Eric Boren
3101370f0b [infra] chrome_release_branch: maintain the last 3 branches
Change-Id: I2402394fa02d2e2e0957fe55e7c9088ddfeffcc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289483
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-05-13 18:13:13 +00:00
Brian Osman
9aaec36e45 Plumbing SkMatrixProvider into the raster backend
Change-Id: Ic5786b995fdb439871f2e3ab94cd07a945de19af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288776
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-05-13 18:05:32 +00:00
Chris Dalton
b8d7e00098 Move makeDraw(Indexed)IndirectSpace into GrMeshDrawOp::Target
Change-Id: I9e7e483d2baf24c8c87f22b9658969b9dbed72f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289458
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-05-13 17:52:51 +00:00
Herb Derby
537dc05d41 Fix SkSpan supspan() add test
Change-Id: Ida683aa054fef977b91b3232b063f74344ffc2c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289448
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-05-13 16:51:31 +00:00
Ben Wagner
0c228e3f64 Add ahem.ttf.
This font comes up fairly often due to being included as a primary font
in css testing. There are several Paragraph samples which already assume
it is present at this location. It is fairly small and very liberally
licensed.

This font file is ahem.ttf from
https://www.w3.org/Style/CSS/Test/Fonts/Ahem/ .

Change-Id: I6fdcb036cecca66e725ecb30e0a07fef1dfb1cdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289445
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-05-13 16:32:52 +00:00
Ben Wagner
056d543c91 Put Paragraph SkDebugf behind runtime flag.
Adds the verboseParagraph command line flag to Paragraph samples so that
the informative SkDebugf calls are not made during normal execution.

Also put everything possible into the anonymous namespace.

Change-Id: Idaeb6845e2d8f322fdd0b988441f092d276ffbf1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289441
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2020-05-13 15:38:21 +00:00
Julia Lavrova
68d1433145 Fixing minor bugs: ellipsis on justified text
Change-Id: Ic0ebf53b221defa5d07ba2832666b322a2629547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289020
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-05-13 14:59:21 +00:00
Adlai Holler
25dc7ca1f3 In SkTaskGroup, move the function in case it has heap-allocated storage
Change-Id: Iba79ed5d5116e2e3966e55f674249fa84636fe45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289436
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-05-13 13:43:51 +00:00
Greg Daniel
2f62abdbe9 Update AMD vulkan memory allocator.
Change-Id: I2ed449cdbb8beac24fbd9d9664ab5fc42a0b3e00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289236
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-05-13 13:03:39 +00:00
skia-recreate-skps
b342415570 Update Go Deps
Change-Id: I0b8f7f191949e9cfd05f0f85b85e12fc420cf6da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289359
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-13 05:29:46 +00:00
skia-autoroll
d76d01a5b2 Roll third_party/externals/angle2 9823d86a5a40..3b82fdcf1c83 (14 commits)
9823d86a5a..3b82fdcf1c

git log 9823d86a5a40..3b82fdcf1c83 --date=short --first-parent --format='%ad %ae %s'
2020-05-13 timvp@google.com Revert "Add support for GL_CHROMIUM_texture_filtering"
2020-05-13 ianelliott@google.com Vulkan: Rename SurfaceRotationType to SurfaceRotation
2020-05-12 spang@chromium.org Revert "Vulkan: Add semaphores test to VulkanExternalImageTest"
2020-05-12 jmadill@chromium.org Vulkan: Add immediate scissored clears.
2020-05-12 spang@chromium.org Vulkan: Add semaphores test to VulkanExternalImageTest
2020-05-12 spang@chromium.org Enable validation layers in VulkanExternalHelper
2020-05-12 shrekshao@google.com Fix GetBooleani_v validation and params length for WebGL OES_draw_buffers_indexed
2020-05-12 geofflang@google.com GL: Use a valid internal format for CopyTexImage in BlitGL::blitColorBufferWithShader
2020-05-12 ianelliott@google.com Vulkan: Enhance ReadPixels to deal with pre-rotation
2020-05-12 lexa.knyazev@gmail.com Skip indexed clears on disabled draw buffers
2020-05-12 xinyi.he@arm.com Vulkan: Set maxShaderImageUniforms zero on some Mali GPUs
2020-05-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src bb279b9f0bda..fe0b6a61d732 (5 commits)
2020-05-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src b5f003d7a3ec..55f9d97f3b1e (2 commits)
2020-05-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 7b87548e5a63..d9ba4b7dd30b (1 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@3b82fdcf1c83

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 jlavrova@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/+/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: jlavrova@google.com
Change-Id: I8e2e6db4c5c6b32ed6cd58ae10f166484467b265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289338
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-13 05:24:51 +00:00
skia-autoroll
d127e02fb6 Roll third_party/externals/swiftshader d9ba4b7dd30b..64da65bd1bd5 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d9ba4b7dd30b..64da65bd1bd5

git log d9ba4b7dd30b..64da65bd1bd5 --date=short --first-parent --format='%ad %ae %s'
2020-05-13 sugoi@google.com Fix sRGB color clear

Created with:
  gclient setdep -r third_party/externals/swiftshader@64da65bd1bd5

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 jlavrova@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/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jlavrova@google.com
Change-Id: Ia24b5f486536c4c2914726a65772e7ae7e586c86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289339
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-13 05:24:41 +00:00
skia-autoroll
106f7c1e25 Roll ../src 63c884f8e9c5..e334ec41436b (468 commits)
63c884f8e9..e334ec4143


Created with:
  gclient setdep -r ../src@e334ec4143

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 jlavrova@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/+/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
Bug: None
Tbr: jlavrova@google.com
Change-Id: Iaf786e5d9ee3936d98dea20c177149d352e038cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289336
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-13 05:03:21 +00:00
skia-autoroll
3ebadcc98e Roll third_party/externals/dawn 02beecaec5cd..f4df7916cacb (4 commits)
https://dawn.googlesource.com/dawn.git/+log/02beecaec5cd..f4df7916cacb

git log 02beecaec5cd..f4df7916cacb --date=short --first-parent --format='%ad %ae %s'
2020-05-13 jiawei.shao@intel.com Add validation on the buffer-to-buffer copies within same buffer
2020-05-12 enga@chromium.org Sort same-type bindings in the BGL by binding number
2020-05-12 cwallez@chromium.org Vulkan: Fix ResourceHeap leak for direct-allocated resources.
2020-05-12 rharrison@chromium.org Rolling 5 dependencies and fix test slow down

Also rolling transitive DEPS:
  https://chromium.googlesource.com/chromium/src/third_party/jinja2 b41863e42637..b41863e42637
  https://chromium.googlesource.com/chromium/src/third_party/markupsafe 8f45f5cfa000..8f45f5cfa000
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang b5f003d7a3ec..4fa68edd6819
  https://chromium.googlesource.com/external/github.com/google/shaderc 15a66d72f33a..00ac5d82178c

Created with:
  gclient setdep -r third_party/externals/dawn@f4df7916cacb

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/+/master/autoroll/README.md

Bug: None
Tbr: cwallez@google.com
Change-Id: I7a54d7a8174d983fed00f027e2d9d7700f3d860b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289337
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-05-13 04:59:21 +00:00
Greg Daniel
dd68b78917 Fix VkProtectedContextTest to correctly make SkSurfaces.
Change-Id: I7815e8967ae180c8a45d82c610b77fab4c36323d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289246
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-05-12 19:15:55 +00:00
Robert Phillips
8bd071998e Add GrVkResourceProvider::findCompatibleRenderPass variant that takes an AttachmentsDescriptor
The plan is to create an AttachmentsDescriptor and AttachmentFlags from the GrProgramInfo in order to get a GrVkRenderPass which can be used to findOrCreate a PipelineState.

This is pulled out of:
https://skia-review.googlesource.com/c/skia/+/288462 ([Omnibus] Add program pre-compilation to Vulkan backend)

Bug: skia:9455
Change-Id: I5bc3f65f92cee50567b7bd2d5f2414628869c9b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289222
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-05-12 18:01:13 +00:00
Mike Reed
48fcdacf9e only pass a real paint to drawPicture if we need to
drawPicture(..., paint)

If paint is non-null, drawPicture will always draw the picture into a
temp layer. Thus we should not blindly pass in a "filtered" paint unless
it will actually draw differently (other than the layer itself).

Side-effect: drawing into a layer is also much slower, so a 2nd reason
to not blindly pass in a non-null paint.

Change-Id: I766c0a129d3bb2882cab976fb2780ef9a09278ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/289241
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-12 17:55:43 +00:00