Commit Graph

44959 Commits

Author SHA1 Message Date
Brian Salomon
6790423f84 fix tolerance in read pixels tests
This was accidentally loosened up

Change-Id: I7a95ed5b56aff06114ceaa9c2a3719bd85d4add4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252934
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-11-06 17:28:03 +00:00
Robert Phillips
0efc01d540 Revert "Fully delineate GL usage w/ skia_use_gl"
This reverts commit 078cf3e3b2.

Reason for revert: Appears to be blocking the Chrome roll due to Fuchsia build failures

Original change's description:
> Fully delineate GL usage w/ skia_use_gl
> 
> Change-Id: I17424d2235c7a54c4cda036f01a0b99dadc4b632
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252085
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=mtklein@google.com,bsalomon@google.com,halcanary@google.com,rosasco@google.com

Change-Id: I17ba79bfe6e7f81c126eddbd50ca5384cfa4179c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253098
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-06 17:19:48 +00:00
Mike Klein
da7ef8622e guard all SkVMBlitter debug features together
Change-Id: Idcc4d85683f376da92e9c6f88e35bb7df7ecea6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253090
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-06 16:53:34 +00:00
Nathaniel Nifong
272060a18a find min and max, separared by comma. not minmax.
Change-Id: I04fbd9e1019a42fd7ee6d6ff8c8ec859d85c5aed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252932
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-11-06 16:35:23 +00:00
Nigel Tao
cdc923886b Inline SkWuffsCodec::readFrames
This simplifies the code. It was only called in one place, from the
short SkWuffsCodec::onGetFrameCountInternal function.

Bug: skia:8235
Change-Id: I8af0816fab9f639bbb52ef7fa07b07006825e358
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251856
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2019-11-06 16:33:33 +00:00
John Rosasco
078cf3e3b2 Fully delineate GL usage w/ skia_use_gl
Change-Id: I17424d2235c7a54c4cda036f01a0b99dadc4b632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252085
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-11-06 15:15:03 +00:00
Eric Boren
5676060b8c [infra] Remove Calmbench and ParentRevision bots
Change-Id: I760cf53928ce81403359f7af1486312fb1236d08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252931
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2019-11-06 15:03:43 +00:00
Nathaniel Nifong
a2b2214047 Record min and max frame times from skpbench in perf
This should only add about 20kb per day to the data accumulated in perf.

Change-Id: Ia1ff49aa2987e3cfe435e35b5826cf1383746813
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252485
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2019-11-06 15:01:13 +00:00
Greg Daniel
9b63dc852e Have vulkan command and descriptor sets handle failed creation.
This requires the switch to using more factory functions that can fail,
creating the vulkan objects in the factories (instead of ctor), and
making sure calling code handles the failed creations.

Bug: skia:9603
Change-Id: I22f1852e4cbefe584857f3adccf486cb1326cb68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252928
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2019-11-06 14:50:33 +00:00
Ben Wagner
da53dd5e17 Reland "Fix empty run handling in trivial shaper iterators"
This reverts commit 1803f4ef6f.
And also fixes the primitive shaper.

Change-Id: Ieaeda5522c98d8a9e6f628b8a6cc30cf41278350
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252929
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-11-06 14:32:13 +00:00
Michael Ludwig
d84dd4babb Combine mask and edge distance in TessellationHelper
This also moves the corner scale factors (1 for rectangles, or 1/sin(theta)
into the EdgeVector state, since that is constant for a quad and can be
reused between different edge distance requests.

The OutsetRequest cached data now only needs to decide which codepath to
use for calculating the inset or outset (fast or degenerate). It is now
capable of distinguishing degeneracies for just the inset and not outset
(or vice versa). Previously, if the inset would cause a degeneracy, both
inset and outset operations would go through the slow path.

Change-Id: Idda859152b6f515f2b3d54875b9f40d9feb5da22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252816
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-11-06 13:57:43 +00:00
Robert Phillips
6e54a299cc Assert we are now in the world of single-primitive-type render passes
We want this to be true so that we can know ahead of time what the primitiveType of a given render pass will be and add it to the GrProgramInfo.

This is pulled out of https://skia-review.googlesource.com/c/skia/+/252161/ (Add GrPrimitiveType to GrProgramInfo)

Bug: skia:9455
Change-Id: I3e6365da6db5349dfe7329ef1e20b8c1d6267ff1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252925
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-06 13:38:33 +00:00
skia-autoroll
f00524707d Roll third_party/externals/angle2 67527cb45293..1d09b983031b (5 commits)
67527cb452..1d09b98303

git log 67527cb45293..1d09b983031b --date=short --no-merges --format='%ad %ae %s'
2019-11-05 sugoi@google.com Vulkan: Fix memory corruption crash
2019-11-05 jmadill@chromium.org Remove some ignores from export_targets.py.
2019-11-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/glslang/src 48233ad3d45b..5d0e01d9e7f9 (7 commits)
2019-11-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src f1e5cd73f658..e0d5544c9864 (2 commits)
2019-11-05 sunny.sun@arm.com Vulkan: Enable VK_IMAGE_USAGE_STORAGE_BIT when it is needed

Created with:
  gclient setdep -r third_party/externals/angle2@1d09b983031b

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 ethannicholas@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.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=ethannicholas@google.com
Change-Id: I6623517d23e31fb68d520871dce4999b3e0f65cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253057
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-06 06:17:13 +00:00
skia-autoroll
e127e9f930 Roll third_party/externals/swiftshader aaa64b76c0b4..215bc7949b35 (2 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/aaa64b76c0b4..215bc7949b35

git log aaa64b76c0b4..215bc7949b35 --date=short --no-merges --format='%ad %ae %s'
2019-11-05 jonahr@google.com Add VK_EXT_metal_surface extension support
2019-11-05 capn@google.com Update Vulkan CTS testlist

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

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 ethannicholas@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.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=ethannicholas@google.com
Change-Id: I185b4c67ffded9af8450ada4ab12763d4907419b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253058
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-06 04:39:43 +00:00
recipe-roller
cdc0c23f1a Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/0e2a4d97fd4c50e4a0d2cc0d814cbf98b5db5a7d [lucicfg] Update from v1.11.4 to v1.11.5. (vadimsh@chromium.org)
recipe_engine:
  https://crrev.com/482cd39e373ee9af9c4726064a1a62efcc8bfb2a [buildbucket] Don't accept project=None in schedule_request (olivernewman@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0078019497ce0d21fa5aa8ffe29b3ff47caaf798
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252976
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-05 23:14:51 +00:00
Mike Reed
0cbb90dc81 split out blendmodes for skvm
Idea is to make shared functions around blendmodes, so we can use them from the
blitter-builder, and from effects like ModeColorFilter.

This CL just tries the refactor. After this, will be easy/fun to flesh out (some)
more of the other modes.

Change-Id: Ia55c60099065c16efdc322a5cab425e222540d6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252658
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-05 22:38:34 +00:00
Mike Reed
971e9eb05d split out serial functions for SkFont into separate impl
... in prep for future CL that makes serialiation more complicated
https://skia-review.googlesource.com/c/skia/+/252927

Change-Id: Ica3cb803c6cd47295b4f12574c9965e47dc57ac3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252659
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-05 22:35:24 +00:00
Michael Ludwig
ce200acafa Cache tessellation metadata between inset/outset calls
Change-Id: I1fb4807ab80dad9a02e9e236d43b3f2be7511412
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251769
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-11-05 21:45:14 +00:00
Stephen White
b1576fd065 Dawn: fix mipmap width and height computation during upload.
Don't go below 1 in width or height when downsizing for uploads.
This can happen with rectangular textures, where one dimension hits
the lower bound.

Change-Id: Ica28e6274cf1df658145233ab6694f2c64c55201
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252316
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-11-05 21:07:44 +00:00
Mike Klein
1cc6067757 friendly wrapper to allocate uniforms
This basically wraps up the old `uniforms` and `buf` params
into a new type that has push() and pushF() methods that return
a value you can pass directly to Builder::uniform32() and co.

I think this has uniforms about as streamlined as they can get.

Change-Id: I8f611f91b4a2d7cdb8f05ce0333669d2e3930be8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252937
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-05 21:02:34 +00:00
Stephen White
23607a9a77 Roll Dawn to ToT.
Change-Id: I55568429061f4775979cac4cdd3af59a6af81b6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252924
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-11-05 20:56:44 +00:00
Hal Canary
d394f2ee4f SkPDF/bublic.bzl: switch away from Sfntly subsetter.
Bug: skia:9606
Change-Id: I3fe1078a4fde66f4d8d5e1d9464390e838233c3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252921
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-11-05 20:56:05 +00:00
Ben Wagner
1803f4ef6f Revert "Fix empty run handling in trivial shaper iterators"
This reverts commit 0f3a26dd18.

Reason for revert: Windows bots are broken

Original change's description:
> Fix empty run handling in trivial shaper iterators
> 
> When the text run is of zero length the iterator starts at the end. The
> trivial itereators did not handle this case.
> 
> Change-Id: Id41304500e33d821874f56ab20085cbc4b2d9b0b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252857
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

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

Change-Id: Ia38e46ac4c04def5d374fbbce450538096d90d64
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252923
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-11-05 20:13:43 +00:00
Robert Phillips
73fcde07f8 Revert "Reland "Implement sample mask and sample locations support in Vulkan""
This reverts commit 2245bf8313.

Reason for revert: I believe this is altering a lot of GMs (for the worse)

Original change's description:
> Reland "Implement sample mask and sample locations support in Vulkan"
> 
> This is a reland of 8b915a0c27
> 
> Original change's description:
> > Implement sample mask and sample locations support in Vulkan
> > 
> > Change-Id: I372695ec5360def42a8a997675993264740b0da4
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252038
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Chris Dalton <csmartdalton@google.com>
> 
> Change-Id: Idd0d8f63c7bb1cdd4d905c483f2fe7ed2b34b05f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252306
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: I8e2ad26441f79545858233a4a59cad6898a8aed9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252919
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-05 19:56:16 +00:00
Robert Phillips
368570db19 Revert "Add a "conservative raster" flag to GrPipeline and implement in Vulkan"
This reverts commit ee6b49b3af.

Reason for revert: I believe this is blocking the revert of Ethan's CL

Original change's description:
> Add a "conservative raster" flag to GrPipeline and implement in Vulkan
> 
> This flag is not yet used or tested. Both will come next when we
> enable mixed sampled ccpr.
> 
> Change-Id: Ic242010b1f0b8d81b83731960283e4231f301fd1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252258
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I01792817e7298470a3dc17e3687f1e8e0bc5d726
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252918
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-05 19:51:32 +00:00
Ben Wagner
0f3a26dd18 Fix empty run handling in trivial shaper iterators
When the text run is of zero length the iterator starts at the end. The
trivial itereators did not handle this case.

Change-Id: Id41304500e33d821874f56ab20085cbc4b2d9b0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252857
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-11-05 19:51:11 +00:00
Florin Malita
91a1ec34bf [skottie] Streamlined gradient stop merger
Refactor as a single interpolating loop, based on careful selection
of lerp coefficients.

Change-Id: I58786cddb2f042b53dcbac80c2346736429be102
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252858
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-05 19:44:11 +00:00
recipe-roller
07b3994556 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/f6a2232b48c29b022f7042054bbbb6551d0dd477 Revert "git-cl: Fix some python3 compatibility errors." (ehmaldonado@chromium.org)
  https://crrev.com/c41f72cf44357ea9bed1296259e14404bb8e799f Allow the bot_update api to not fetch tags from the git server. (danakj@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ie00cb2930420726e7b379bceee315198be9fd31b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252845
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-05 19:40:41 +00:00
Mike Klein
96b6150868 implement SkColorFilterShader::isOpaque()
Change-Id: I53872aa96b9cfcb3352cf8d48329e32f19cb97f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252789
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-05 19:23:42 +00:00
Chris Dalton
ee6b49b3af Add a "conservative raster" flag to GrPipeline and implement in Vulkan
This flag is not yet used or tested. Both will come next when we
enable mixed sampled ccpr.

Change-Id: Ic242010b1f0b8d81b83731960283e4231f301fd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252258
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-11-05 19:05:34 +00:00
Greg Daniel
e643da6ab8 Add new macro for checking device lost when making Vulkan calls.
This CL itself doesn't really change how anything is running today. However,
it is the first step into gracefully supporting a vulkan device lost return
error and being able to correctly clean everything up.

Bug: skia:9603
Change-Id: I9693c514a32ca437df61a7aee63651e2e40ee1c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252819
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-11-05 18:56:35 +00:00
Eric Boren
e2edfba592 [recipes] CanvasKit, PathKit, some others don't need bot_update
Bug: skia:9588
Change-Id: I8dc915f9cedd40b94f37f3d1ae89bb7d4767814f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252186
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-05 18:46:34 +00:00
Ethan Nicholas
2245bf8313 Reland "Implement sample mask and sample locations support in Vulkan"
This is a reland of 8b915a0c27

Original change's description:
> Implement sample mask and sample locations support in Vulkan
> 
> Change-Id: I372695ec5360def42a8a997675993264740b0da4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252038
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>

Change-Id: Idd0d8f63c7bb1cdd4d905c483f2fe7ed2b34b05f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252306
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-11-05 18:41:31 +00:00
Mike Klein
5625412f02 unify program() and uniforms()
It's clearer and more efficient to emit uniforms
as we use them.  The pattern to look for is something like

    skvm::I32 val = p->uniform32(uniforms, buf->bytes());
    buf->push_back(fVal);

where fVal holds the actual uniform value, and val is its program
counterpart.

Switching to SkTDArray lets us use friendlier methods like bytes() and
append(N) in the effect code.

It's a lot easier to follow this way once you get used to it and much
less error-prone.  No need to split the can-we-do-it logic up from the
uniform emission, and so no chance to write logic twice that
acccidentally disagrees.

Effects now always emit uniforms when you call program(), which means we
occasionally do that twice, once when building the Key to look up cached
programs, and once again when building the program if the cache misses.
That's not that big of a deal... it reuses the same memory exactly, and
I've added some notes around the code and assertions that everything
matches up exactly.  It only happens on cache miss, so it's dwarfed by
the cost of building and JITing the program anwyay.

Change-Id: I55a9252b11b2c0cd5f7ab8ace6df5fef29342c10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252837
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-05 18:41:30 +00:00
Brian Osman
09ee112bdb Reland "Fully embrace skcms types in SkColorSpace API"
This reverts commit 6af9b1c673.

Change-Id: I7954951497e57475ab6f1c7f946b47aa17f1ac8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252817
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-11-05 18:36:26 +00:00
Brian Salomon
b3bd86405b Cleanup kGray_8 readback.
Rm unused function SkColorTypeIsGray.

Expect kGray_8 readback to work in tests.

Bug: skia:8962

Change-Id: Iad9d2be3e0a2e594e62dc681b79c59e0a833116a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245162
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-11-05 18:36:25 +00:00
Florin Malita
73a722ce97 [skottie] Fix trim path mode interpretation
"m": 1 -> parallel trim
  "m": 2 -> serial trim

(we had these backwards)

TBR=
Bug: skia:9599
Change-Id: Ib764c04a96c3a1e627553d8b8588028a411b5240
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252796
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-11-05 18:31:24 +00:00
skia-autoroll
83e979f5f4 Roll third_party/externals/angle2 6c7208f93d6e..67527cb45293 (10 commits)
6c7208f93d..67527cb452

git log 6c7208f93d6e..67527cb45293 --date=short --no-merges --format='%ad %ae %s'
2019-11-05 mrlachatte@gmail.com Fix compilation on UWP targets.
2019-11-05 jmadill@chromium.org Add EGL GGP extensions.
2019-11-04 j.vigil@samsung.com EGL: Implement EGL_KHR_surfaceless_context
2019-11-04 timvp@google.com Vulkan: Increase Fence Wait Time
2019-11-04 j.vigil@samsung.com New end2end test to print EGL information
2019-11-04 timvp@google.com Fix Platform methods list
2019-11-04 jmadill@chromium.org Vulkan: Don't pass width/height to Surface constructors.
2019-11-04 tobine@google.com Vulkan:Ignore layer warnings about provoking vtx ext
2019-11-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader fda994c63075..aaa64b76c0b4 (8 commits)
2019-11-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 618ee509421f..f1e5cd73f658 (3 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@67527cb45293

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 ethannicholas@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.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=ethannicholas@google.com
Change-Id: I3381fc30053c10bf77cb4f2beaa0b7700834ea7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252654
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-11-05 18:31:23 +00:00
Florin Malita
49081f6792 [skottie] Use SkColor4f for gradient color stops
TBR=
Change-Id: I941a2b876f87183c5750bb3cf68fc0cd7f0e56a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252799
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-11-05 18:26:22 +00:00
recipe-roller
2945c1ee86 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
depot_tools:
  https://crrev.com/288e358f3f720c0c1cd1c61a681d7d5bdfe7c5d7 owners_finder: Fix flaky tests. (ehmaldonado@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I03b04a0d7c63b937167a655749f21eccf4888621
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252640
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2019-11-05 18:26:21 +00:00
Ben Wagner
057985ad67 Fail Skpbench on unsupported hardware
Stop running Skpbench on unsupported hardware.

Change-Id: Iafde07d493dcccdd41dffea09255da68cf44afdb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252044
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
2019-11-05 18:21:19 +00:00
Herb Derby
57643aa1c2 Speed up diff canvas using small bit vector
GlyphIDs < 128 are the vast majority of ids in roman text websites.
This change exploits this to do a fast check to see if a glyph has
already been sent from the Renderer to the GPU. This does not change
the performance of CJK glyphs.

Remember each glyphID entry takes 4 bits to encode sub-pixel position
information.

SkDiffBench-wikicat: 143ms -> 118ms

Change-Id: If5905e0dc6b39ae69e0235e81a9b6050afd25a97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/251760
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Khushal Sagar <khushalsagar@google.com>
2019-11-05 18:21:18 +00:00
Mike Klein
746acf1ebc add color filter support
- move some helpers to central spot
  - add a color filter interface, the same as shader without (x,y)
  - implement matrix color filter (pretty naively)
    and color filter shader (pretty reasonably)
  - extend GM to demonstrate

The new blitters with color filters are failing to JIT because they're
running out of registers.  (They still work fine on the interpreter of
course.)  I'm going to take a look to see whether there's something I
can do either in the effect program() code or in the optimizer to
rearrange to get it to fit and JIT.

Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_SKVM_BLITTER
Change-Id: Ibdc1a5e7b9e7a14778efba583b7821bcd4f3062a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252788
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-05 18:15:43 +00:00
Mike Klein
7a13b461e6 x86-64 JIT support for Op::index
This lets shaders that use 'x' JIT on x86.

I started with paddd and {0,-1,-2,-3,...}, which worked fine but on
second thought seemed a bit odd.  I've switched to psubd and
{0,1,2,3,...} but I've left in support for paddd with a memory arg.

gm/skvm.cpp now JITs fully again and continues to draw the same as
the interpreter did.

Simplify embedded data alignment a little... memory operands don't
need full register alignment in AVX like they used to in SSE.  So
just align everything to the vector element size like we do on ARM,
and reorder [splats,bytes_masks,iota] to match the order we declare
and handle them in the code above.

Add unit tests for vpaddd + vpsubd.

Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_SKVM_BLITTER
Change-Id: I6b8d060450cca7f437a1d2a597a8a0e0e8d51b33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252797
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-11-05 17:11:37 +00:00
Chris Dalton
36574af816 ccpr: Fail gracefully when atlas instantiation fails
This fixes a crash, but still does not answer the question why
8192x8192 msaa atlas instantiations are failing sporadically on
vulkan. Luckily we will be switching to mixed samples soon, so this
problem is very temporary.

Change-Id: I7dedb3c943f432543c12f02587ece8d71443a1cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252646
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-11-05 16:37:39 +00:00
Brian Salomon
e9b546970e Add valgrind suppressions for GrClearImage
Similar to existing supprresions for bogus errors in GrConvertPixels.

Change-Id: I50f3b47ca3a88c71af532fa69aa2566ad0f03753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-11-05 15:46:13 +00:00
Robert Phillips
6af9b1c673 Revert "Fully embrace skcms types in SkColorSpace API"
This reverts commit 701522798a.

Reason for revert: Maybe blocking the Android roll

Original change's description:
> Fully embrace skcms types in SkColorSpace API
> 
> Remove the SkMatrix44 getter entirely.
> 
> Change-Id: I25bfe68a7a9b21d8a8696415b517cb79fc2d7a94
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252596
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,brianosman@google.com,reed@google.com

Change-Id: Ic277d54d4ac8c84f00405946c927a3aee4e33068
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252801
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-05 15:03:49 +00:00
Mike Klein
cfa4f60270 simpler uniforms() api
By making uniforms() just append to the uniform vector, there's no more
need for two passes, no need for the blitter to ever even know how many
uniforms the effects use, and the effects now never need to deal with a
nullptr uniform buffer.  Much simpler all around.

While we're refactoring, convert the uniform buffer de jure to
std::vector<uint32_t>, which is what we'd been treating the old
std::vector<uint8_t> as by convention, and switch the program() offset
parameter type to size_t as a reminder that it's measured in bytes.

Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_SKVM_BLITTER
Change-Id: I81d2c92aae37a650104f384f815df78c8a186270
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252776
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-05 13:26:22 +00:00
Mike Klein
fb9146ffc7 merge key() and CanBuild() into CacheKey()
We can unify these similar functions to reduce the amount of work we do
and guarantee SkShaderBase::program() is never called with a null
skvm::Builder*.  We now only call program() to do real work: one call to
get a shader key, and if no program is found in the cache, one more call
to build the blitter program.  No null checks are needed any longer.

Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_SKVM_BLITTER
Change-Id: I6e73d9d264690f04ddcc92e6f7b3c42654f8a41c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252759
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-05 12:35:01 +00:00
Mike Klein
e8356ad35d indent loop so it stands out
Change-Id: Iea0f804b1b2fed9e663e45c33fb54a91b10fd07b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252652
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-11-05 11:33:54 +00:00