Commit Graph

47267 Commits

Author SHA1 Message Date
Brian Salomon
bc074a68df Add SkBudgeted parameter to SkImage::makeTextureImage().
Also strengthens/adds some guarantees about this function:
* Always returns the same image if the original is texture-backed and
compatible with GrMipMapped (WRT HW MIP support)
* If a new texture backed image is returned it is always an uncached
texture that is not shared with another image or owned by an image
generator.

Adds a GrImageTexGenPolicy that allows control through image/bitmap
GrTextureProducers of whether a new texture must be made and whether
that texture should be budgeted or not.

Increases unit test coverage of this API.

Bug: skia:8669

Change-Id: Ifc0681856114a08fc8cfc57ca83d22efb1c1f166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274938
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-18 17:27:41 +00:00
Brian Osman
0b1e5fc8f2 Remove GrGLSLUtil
This had a not-very-useful matrix utility in it. We've had setSkMatrix
for a while, and the one other user always wanted a 4x4, which can be
done with SkM44 just as easily.

Change-Id: I3f00a0a1ccaf58bc9c775da4eef819af5a5fa7e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277605
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-18 16:42:28 +00:00
Jim Van Verth
26651883d0 Revert "Reland "Clear out atlases if they haven't been used in a while.""
This reverts commit 0bd00f438e.

Reason for revert: Causing text issues in Chrome.

Original change's description:
> Reland "Clear out atlases if they haven't been used in a while."
> 
> This is a reland of 79007c9309
> 
> Original change's description:
> > Clear out atlases if they haven't been used in a while.
> > 
> > This will stage out atlas pages one at a time with an interval of
> > 256 flushes between them. Also removes the last page to help
> > conserve memory if text or other atlas-using systems are not in use.
> > 
> > Bug: 1058905
> > Change-Id: I8717621033068d0e24da944356d91b0f35e5373b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276764
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Herb Derby <herb@google.com>
> 
> Bug: 1058905
> Change-Id: I25b0037cb1608ae0bda641e0d0588afaf3dd47e5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276960
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,herb@google.com,robertphillips@google.com,backer@google.com

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

Bug: 1058905
Change-Id: I8b6f0d1a1fb522d40cdc34ec8a2d420830117b86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277606
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-03-18 16:26:28 +00:00
Mike Reed
8edacdb6a5 remove uncalled virtuals
Change-Id: Icd2e7ec8f321a1828b317d74c0ce4f3ada971e0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276765
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-18 15:42:29 +00:00
Eric Boren
6b24312674 [infra] Run recipe and python unittests unbuffered
Should help to prevent missing log output.

Change-Id: I1f82f6e5792aaadec03b4b2e5e87e599332f37e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277603
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-03-18 15:33:38 +00:00
Brian Salomon
00ba5ef4a6 Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"
This reverts commit f6784a8c84.

Reason for revert: breakage of builds

Original change's description:
> Don't build GL on Metal, Vulkan, Dawn, Direct3D bots
> 
> Misc fixes to omit GL-dependent targets and fix assumptions that
> SK_SUPPORT_GPU implies SK_GL.
> 
> Bug: skia:10051
> Change-Id: Ida88ac3f1bf4d9e23f66d0700c2bce18b938ed6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277456
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

Change-Id: I4e02f675fd8820ed3c8efee192c64e570a23c3e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10051
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-03-18 14:42:28 +00:00
Robert Phillips
4f93c573e2 Update AAHairlineOp to surface its programInfos at record time
This CL is interesting bc the AAHairlineOp is the first one that requires multiple programInfos.
Correspondingly, it is also the first one that shares a pipeline between said multiple programInfos.

Bug: skia:9455
Change-Id: I2369abbdeaf4eac2bc9547ad36631beba29bd641
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277203
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-03-18 14:36:18 +00:00
Brian Salomon
f6784a8c84 Don't build GL on Metal, Vulkan, Dawn, Direct3D bots
Misc fixes to omit GL-dependent targets and fix assumptions that
SK_SUPPORT_GPU implies SK_GL.

Bug: skia:10051
Change-Id: Ida88ac3f1bf4d9e23f66d0700c2bce18b938ed6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277456
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-18 14:26:28 +00:00
Eric Boren
0d6629ad2a [infra] gen_task: follow-ups from http://review.skia.org/275076
Change-Id: I766c7e46f6f6da85411d1c4c65122c33e27a630d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276197
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2020-03-18 14:15:28 +00:00
Mike Reed
d7e0131c7e remove old experimental apis
Change-Id: Ib395faa621ae3919a3b04dc8ef1a362ef4916ce0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277580
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-03-18 03:54:58 +00:00
Greg Daniel
c2b7d47fdd Revert "Set up eGPU/discrete support for MacOS."
This reverts commit 1c3bea4593.

Reason for revert: breaking ios build

Original change's description:
> Set up eGPU/discrete support for MacOS.
> 
> Pulled out of https://skia-review.googlesource.com/c/skia/+/271319.
> 
> For Metal, will default to an eGPU or discrete GPU if one is available.
> For GL, will attempt to use a Radeon eGPU, and will fallback
> if one can't be found.
> 
> Change-Id: I0a1efb3afca612ac75be56f633d811dda68f9d10
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277516
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

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

Change-Id: I84c64793cc305a415f54ff0496d4ec410a94687f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277579
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-03-18 01:04:58 +00:00
Chris Dalton
304e14d883 Remove FixedDynamicState from GrProgramInfo and GrPipeline
Everybody uses explicit binding now.

Change-Id: Idb6f64104eddd31d28dd2ba19f9743520a4e5170
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277541
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-17 23:09:08 +00:00
Jim Van Verth
1c3bea4593 Set up eGPU/discrete support for MacOS.
Pulled out of https://skia-review.googlesource.com/c/skia/+/271319.

For Metal, will default to an eGPU or discrete GPU if one is available.
For GL, will attempt to use a Radeon eGPU, and will fallback
if one can't be found.

Change-Id: I0a1efb3afca612ac75be56f633d811dda68f9d10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277516
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-03-17 21:44:58 +00:00
Herb Derby
43f7641e1b Arrange instruction to reduce register pressure
When converting from Instructions to OptimizedInstructions
place instructions that reduce register pressure earlier in
the instruction list.

This change reduces some register pressure in SkVM, and
improves the bitmap_RGBA_8888_A_scale_bilerp benchmark by
about 5%.

Change-Id: If5f6385bd2f7720701d1c827265062b35491a790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276485
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-17 21:37:18 +00:00
Florin Malita
56015e0115 SkStrikeCache: only validate post-purge
Now that we call internalPurge() frequently and under a spinlock, the
initial validation can yield significant contention in debug builds.

Change-Id: I360183f7fca30dc35d61658258ed7980fcdc6721
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277467
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-17 20:07:49 +00:00
Chris Dalton
3bf2f3a9da Remove DynamicStateArrays from GrProgramInfo and GrPipeline
Every op that updates dynamic state between draws has now been
migrated to explicit binding.

Change-Id: Ibd13c9c0ffb16a205c073dfb4fd21d93f496dc52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277493
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-03-17 19:12:18 +00:00
Chris Dalton
dbb833b457 Migrate GrFillRectOp and GrTextureOp to the new bind/draw API
Renames GrQuadPerEdgeAA::ConfigureMesh to "IssueDraw", and modifies it
to call draw*() directly on an opsRenderPass. Updates GrFillRectOp and
GrTextureOp to bind their own pipelines, buffers, and textures, and
then call IssueDraw. Removes DynamicStateArrays and FixedDynamicState
from GrTextureOp, in favor of directly re-binding textures during
onExecute.

Bug: skia:9455
Change-Id: Ia4a7a467061bfd0e35d363295ef1821ed2ed4e9d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277496
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-17 18:46:18 +00:00
Kevin Lubick
d8add5c960 Add fiddle demonstrating alpha when used on saveLayer
Change-Id: I4ba2d911a035871512f26201d561d64e9580556b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277465
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-03-17 18:44:24 +00:00
Kevin Lubick
beefcb9d38 Reland saveLayer can omit the rectangle argument.
For API simplicity, if the rectangle is to be omitted, the client
should only provide the paint. (emscripten already does parameter
count checking, so let's use that instead of doing it ourselves).

This also adds tests to help verify the new behavior.

Revert "Revert "Allow null rect for saveLayer""

This reverts commit 7957d53c80.

Bug: skia:10043
Change-Id: I9ed8caabbfc77deab1ca3d9b1a415489e012528f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277399
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Dan Field <dnfield@google.com>
2020-03-17 17:38:54 +00:00
Heather Miller
961caee97a add m82 release notes
Bug: skia:
Change-Id: I1f24f8c8e58d8d40947662fac70efe7a9fe4550e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277461
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2020-03-17 17:17:41 +00:00
Stephen White
8eda499f6f Dawn: embed a staging buffer inside the uniform ring buffer.
This avoids the allocation of many small staging buffers for uniform
uploads.

Change-Id: I81ddc0f2b72435a3eabfc51f925b8ea24c0a585f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/275438
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-03-17 16:55:38 +00:00
Florin Malita
141ac68fa0 [skottie] Cleanup: split animators into separate CUs
No functional changes, just code reshuffle.

TBR=

Change-Id: Ia04add9d51d6e84903d010534434c9a60464a72a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277457
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-03-17 15:48:17 +00:00
Michael Ludwig
dc963b3125 More comparison fixes
TBR

Change-Id: I7a7fe47eb08538b631e70146dbec71e6a1439596
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277459
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-03-17 15:23:30 +00:00
Chris Dalton
be45742933 Change GrProgramInfo::visitProxies to "visitFPProxies"
We are removing dynamic state from the ProgramInfo, so the Ops will
need to invoke visits on their own primProc proxies.

Change-Id: I7ab227ab71208b7c7bcb7a9deb56b9abd556d6aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277236
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-03-17 15:06:55 +00:00
Chris Dalton
765ed36ad4 Delete GrOpsRenderPass::drawMeshes
Everyone is responsible to set up their own scissor and textures now.

Change-Id: Ic3547f00c0e7908409631951de4b7237b9bce23b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277177
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-17 15:05:54 +00:00
Michael Ludwig
c42fb08ad1 Fix unsigned/signed comparison in assert
Change-Id: Ib49265ea01909138905746fa83b8dcca60132359
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277458
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-03-17 14:49:13 +00:00
Michael Ludwig
cd01979004 Refactor GrMemoryPool into reusable GrBlockAllocator
This moves the byte block linked list structure outside of GrMemoryPool
into a new type, GrBlockAllocator. This new type is solely responsible
for managing the byte blocks, tracking where the next allocation
occurs, and creating/destroying the byte blocks. It also tries to
encapsulate all of/most alignment related math, while making it
convenient for clients to add per-allocation padding/metadata.

It has added functionality compared to the original block linked list
that was embedded in GrMemoryPool:
 - Supports resetting the entire allocator
 - Supports resizing the last allocation
 - Is able to rewind an entire stack of allocations, instead of just the
   last allocation.
 - Supports multiple block growth policies instead of just a fixed size.
 - Supports templated alignment, and variable alignment within a single
   GrBlockAllocator
 - Query the amount of available memory
 - Performs as much math as possible in 32-bit ints with static asserts
   that ensure overflow won't happen.

Some of this flexibility was added so that the GrBlockAllocator can be
used to implement an arena allocator similar to SkArenaAlloc, or to
replace the use of SkTArray in GrQuadBuffer. It is also likely possible
that GrAllocator can be written on top of GrBlockAllocator. I will try
to perform these consolidations in later CLs.

Change-Id: Ia6c8709642369b66b88eb1bc46264fb2aa9b62ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262216
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-03-17 14:41:14 +00:00
Brian Osman
1facd5e8d1 Make persistent cache serialization safer
Add a version tag at the start, reject any cache blobs without it

Bug: chromium:1062018
Change-Id: I18bb668e6b836e1247640e9286a69a3e745babfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-03-17 13:52:47 +00:00
skia-autoroll
a17558c9f7 Roll ../src 6d7621abf90d..21cbc653d600 (395 commits)
6d7621abf9..21cbc653d6


Created with:
  gclient setdep -r ../src@21cbc653d6

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 egdaniel@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: egdaniel@google.com
Change-Id: Ib77253f4c4ff6a1c4e3bb62b0445299afd547233
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277418
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-17 04:37:17 +00:00
skia-autoroll
881b7e97da Roll third_party/externals/angle2 cb9a86a9d867..d24752e63ae4 (10 commits)
cb9a86a9d8..d24752e63a

git log cb9a86a9d867..d24752e63ae4 --date=short --first-parent --format='%ad %ae %s'
2020-03-17 jmadill@chromium.org Capture/Replay: Write to single binary data file.
2020-03-17 jmadill@chromium.org Re-enable optimization for angle_perftests.
2020-03-16 jmadill@chromium.org Move perf test common files to a source set.
2020-03-16 jmadill@chromium.org Refactor ANGLE common test utils.
2020-03-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src dd3d91691f1e..25ede1ced679 (5 commits)
2020-03-16 jmadill@chromium.org Fix documentation typo.
2020-03-16 jmadill@chromium.org Add more documentation on testing infrastructure.
2020-03-16 xiaoxuan.liu@arm.com GLES: Skip tests if vertex SSBO were not supported
2020-03-16 jmadill@chromium.org Fix running trace tests in non-standard directories.
2020-03-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 18daa81e3d3d..3a50a43df988 (14 commits)

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

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 egdaniel@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-Debian9-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: egdaniel@google.com
Change-Id: I73041ec64875b2feb4ee5391a9cccf3d12eabdd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277417
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-17 04:34:17 +00:00
skia-autoroll
95b327de31 Roll third_party/externals/swiftshader 3a50a43df988..440fc9959f06 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/3a50a43df988..440fc9959f06

git log 3a50a43df988..440fc9959f06 --date=short --first-parent --format='%ad %ae %s'
2020-03-16 swiftshader.regress@gmail.com Regres: Update test lists @ 3a50a43d

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

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 egdaniel@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-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: egdaniel@google.com
Change-Id: I5eb58594a6125a24c5c3879e8532734c3a500c62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277416
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-17 04:30:17 +00:00
Mike Klein
6b48e62ed2 remove unused mutate() apis
Whether we should shrink at the end of mutate() turns out to be moot.

:)

Change-Id: Ic29df5734e3057f165f695b2d03f8e7eb0eeb4dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277299
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-16 20:44:36 +00:00
Herb Derby
3b946c1618 Check fullness and purge on every strike lookup
In the old code, the cache was checked and perged on every reattach
of a strike. That was left out of the multi-threaded code. Add the
check and purge back in to maintain cache size.

* Removed minimum cache size from setCacheSizeLimit.

Bug: skia:10046
Change-Id: I2438c83f04b6da8133c161a29604c3c3d7f58cd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277066
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-03-16 19:59:56 +00:00
Mike Klein
a30aeae875 impl SkTDynamicHash with SkTHashTable
The only vaguely tricky thing to adapt from templating on T to T*.

Don't think there's a need for the unit tests now right?

Bug: skia:9703
Change-Id: Ib8fcebd9e0e35bea5ef23e6fd5962654a28d587b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277214
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-16 19:59:26 +00:00
Chris Dalton
aa0e45c232 Add pass-through helper methods from GrOpFlushState to GrOpsRenderPass
Change-Id: Ifa18e909978367a4502dbf6b35a62a437e83b5c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276842
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-16 19:53:26 +00:00
Mike Klein
04ef810839 port GrProxyProvider off SkTDynamicHash::Iter
This was the remaining tricky use of Iter,
removing elements from the table while iterating.

In this case, since we're removing everything, it looks
unnecessary... we can just clear the table when we're done.

Bug: skia:9703
Change-Id: I5333d9fade1e52bd82b5d9c6ac494aad068d5dd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277207
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-16 18:39:10 +00:00
Eric Boren
457c1eb913 [infra] Minor refactor for recipe properties in gen_tasks
Change-Id: I76fb1e5da5dd162e8245758ccae8effac2f21c0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277179
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2020-03-16 18:29:50 +00:00
Kevin Lubick
7957d53c80 Revert "Allow null rect for saveLayer"
This reverts commit f2e9709266.

Reason for revert: Breaking the build

Original change's description:
> Allow null rect for saveLayer
> 
> Bug: skia:10043
> Change-Id: Ia049e72565810e1f72500141678e166027230535
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277097
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=kjlubick@google.com,dnfield@google.com

Change-Id: I0aae159380cbdfd4ead0f8e3e9c9de284c2dc103
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277182
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2020-03-16 18:08:45 +00:00
Dan Field
3d44f73b64 Sweep gradient support for CanvasKit
Change-Id: I04af9ea7aa6c6f95de6ff1eaf5ee41d59df7f09e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277059
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-03-16 16:57:03 +00:00
Dan Field
f2e9709266 Allow null rect for saveLayer
Bug: skia:10043
Change-Id: Ia049e72565810e1f72500141678e166027230535
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277097
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-03-16 16:46:12 +00:00
Chris Dalton
eb694b767c Rename GrMesh to GrSimpleMesh
Change-Id: Ib164ff3ec41cb798385f2feea8ad09c037dbc30d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276837
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-16 16:18:30 +00:00
Heather Miller
6c138716e9 fix up release notes file for milestone 83
Bug: skia:
Change-Id: Ia83f2b69948eeb747ecc171fb8677c8e22cc8ba7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277176
Reviewed-by: Heather Miller <hcm@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2020-03-16 15:14:30 +00:00
Chris Dalton
37c7bdda22 Remove GrMesh::setVertexData
Fuses the relevant functionality into the set() calls.

Change-Id: I3a764219425c35967942366c60a6b9ee6ec48e11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/276836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-16 14:32:50 +00:00
Chris Dalton
56c09f0d44 Rearrange Vulkan asserts for samplers
Change-Id: I6bbe834f0cf1ad725e1f3843b23fde958c749d8b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277060
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-03-16 14:30:00 +00:00
Mike Klein
cff6396875 begin refactoring SkTDynamicHash and SkTMultiMap
The biggest mismatch between these and SkTHash{Map,Set,Table}
is the old ones provide Iter and ConstIter, the new ones foreach().

This CL,

   - adds foreach() methods to the old types,
   - replaces all uses of ConstIter with foreach(),
   - replaces most uses of Iter with foreach(),

I'm leaving one spot using Iter to walk the table and remove its
elements for its own CL... it'll be a little more complicated to get
that right.

From there it should be straightforward to turn SkTDynamicHash
into a thin wrapper over an SkTHashTable.

Bugs: skia:9703
Change-Id: Ia6ba87c35b89585c42b5b9f118f4cbf3abd04f0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277098
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-03-16 14:06:30 +00:00
Mike Klein
16701eecd5 Shrink SkTHashTables
Since we grow when size >= 3/4 cap, shrink when size <= 1/4 cap?

Keeping a minimum table size of 4 preserves the invariant that tables
with non-zero capacity always have at least one empty slot, allowing
find() to determine a particular key is not in the table by stumbling
upon that empty slot on the key's hash chain.  That's effectively what
we're asserting at SkTHash.h:84.

Bug: skia:10041
Change-Id: I4247e4ff155fd11561086547525354365bc69f55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277096
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-03-16 13:38:10 +00:00
skia-autoroll
0557f6a48f Roll ../src 907b992f87c0..6d7621abf90d (422 commits)
907b992f87..6d7621abf9


Created with:
  gclient setdep -r ../src@6d7621abf9

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 egdaniel@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: egdaniel@google.com
Change-Id: Idbfba6f05cd5873ab3c82eb81745329a1bfcd393
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277120
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-16 13:33:06 +00:00
skia-autoroll
ac3e76571a Roll third_party/externals/angle2 6963f58c7678..cb9a86a9d867 (13 commits)
6963f58c76..cb9a86a9d8

git log 6963f58c7678..cb9a86a9d867 --date=short --first-parent --format='%ad %ae %s'
2020-03-15 ynovikov@chromium.org Skip SwANGLE GLES31 tests which crash with 32-bit Subzero.
2020-03-15 jmadill@chromium.org Format perf_test.cc.
2020-03-15 jmadill@chromium.org Temporarily disable optimizations in angle_perftests.
2020-03-15 jmadill@chromium.org Trace Tests: Rebase path to relative dir.
2020-03-13 m.maiya@samsung.com EGL: populate EGL_NATIVE_VISUAL_ID values for Android
2020-03-13 ynovikov@chromium.org Revert "Skip crashing dEQP-GLES3.functional.samplers.*_tex_3d.* on SwANGLE"
2020-03-13 lexa.knyazev@gmail.com Implement ScanForward64 on 32-bit platforms
2020-03-13 timvp@google.com Add ANGLE_FOR_ANDROID_TOAST_MESSAGE to AndroidManifest.xml
2020-03-13 jmadill@chromium.org Vulkan: Timestamp internal RenderPasses in perf tests.
2020-03-13 jmadill@chromium.org Update export_targets to fix presubmit on Windows.
2020-03-13 courtneygo@google.com Vulkan: Disable robustness support
2020-03-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 16ae92a4ee52..18daa81e3d3d (15 commits)
2020-03-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 29adf277cb19..f1d9f12a19de (2 commits)

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

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 egdaniel@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-Debian9-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: egdaniel@google.com
Change-Id: I2c8d687cdc0ab3c8993ce706bf9591916b2399f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277119
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-16 13:33:05 +00:00
skia-autoroll
f94815068d Roll third_party/externals/swiftshader 18daa81e3d3d..3a50a43df988 (14 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/18daa81e3d3d..3a50a43df988

git log 18daa81e3d3d..3a50a43df988 --date=short --first-parent --format='%ad %ae %s'
2020-03-14 bclayton@google.com SpirvShaderDebugger: Implement scope nesting
2020-03-13 sugoi@google.com Compile Vulkan library with Subzero in Chromium
2020-03-13 bclayton@google.com SpirvShader: Silence warnings of unexpected opcodes
2020-03-13 amaiorano@google.com Subzero: hide dependency on Marl
2020-03-13 amaiorano@google.com BUILD.gn: add missing dependency onto marl for SubzeroReactor
2020-03-13 capn@google.com Consistently use TRUE/FALSE in CMakeLists.txt
2020-03-13 capn@google.com Exclude all static libraries from "all" build target
2020-03-13 amaiorano@google.com Subzero: replace Win32 fibers with Marl for couroutines
2020-03-13 bclayton@google.com SpirvShaderDebugger: Add flag for printing opcodes as they're executed
2020-03-13 bclayton@google.com SpirvShaderDebugger: Make Function extend Scope
2020-03-13 bclayton@google.com SpirvShaderDebugger: Add string helper for debug kinds
2020-03-13 bclayton@google.com SpirvShader: Implement OpenCLDebugInfo100DebugInfoNone
2020-03-13 bclayton@google.com SpirvShaderDebugger: Stub UNIMPLEMENTED() opcodes
2020-03-13 bclayton@google.com SpirvShader: Implement OpenCLDebugInfo100DebugInlinedAt

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

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 egdaniel@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-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: egdaniel@google.com
Change-Id: Ibec65fee84b8412f10357623d35c54490855a873
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277118
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-03-16 13:28:02 +00:00
skia-recreate-skps
9f5ed1cd7f Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Id02753698624d21e34a296dc3e0f1c43ebeefc2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277104
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-03-16 13:28:00 +00:00