Commit Graph

47791 Commits

Author SHA1 Message Date
Florin Malita
a362669e1c [svg] Remove primitive type wrappers
SkSVGPrimitiveTypeWrapper must have served some purpose in the past
(maybe? I have no memory of this place :P), but now it basically does
templated-nothing.

Well...

Change-Id: Id93487c345ea075d09b14024f4bcd2f987789518
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282680
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-09 19:06:36 +00:00
Robert Phillips
e87106df32 Add check that the PlotLocator's plotIndex is consistent w/ the glyph rect
This verifies that the redundant information w/in the AtlasLocator stays consistent.

Bug: 1056730
Change-Id: Ic76d831c3086cfa85979771e1611853d99031f60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282614
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-04-09 18:57:06 +00:00
Tyler Denniston
6c8314efa1 [SVG] Implement currentColor for fill and stroke
The 'color' presentation attribute when set determines the value of the
special color value 'currentColor'. See the color-prop-01-b test for an
example.

Not handled in this CL:
- The color type needs to be changed to be inheritable.
- currentColor should also be usable for stop-color for gradients. See
  <https://www.w3.org/TR/SVG11/color.html#ColorProperty> for a full list
  of attributes that can use currentColor.

Change-Id: Icf81b5313cda688d1b6e20809b9b339f517b9ada
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282638
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-04-09 18:48:16 +00:00
Robert Phillips
4d932d170f Move the GrStrikeCache from the recording context to the direct context
This solidifies that the strike cache and, thus, GrStrikes can't be used when recording DDLs.

TBR=bsalomon@google.com
Bug: 1056730
Change-Id: I15ce3ac2c0a9db0f476c03ef855bd14d22551043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282536
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-09 18:47:27 +00:00
Mike Reed
73e334469e fix computation for localToWorld
Change-Id: I962f47dce685a938f6ec9f7fbbb79c34ea9b3c4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282677
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-09 18:35:06 +00:00
Ben Wagner
cc81e202b4 Take MorphologyImageFilter radii as SkScalar.
The morphology image filters work on pixels, so took the radii as
integers. However, these radii will be mapped through the CTM, so any
rounding should happen as late as possible or the effect will be overly
discretized.

Bug: skia:10110
Change-Id: I62ab6c37d0b4612690addc48c9bc473099ac36b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282636
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-09 18:27:17 +00:00
Kevin Lubick
d5f1ccb99f [infra] Update dimensions for Golo Windows machines
Required https://chrome-internal-review.googlesource.com/c/infradata/config/+/2864018
to add the additional CPU dimension

Bug: 1068726
Change-Id: I68734cdaa0956fe73ee50429e0581d4d123cc024
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282676
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2020-04-09 18:19:08 +00:00
Mike Klein
d7d1462b50 example of overdraw CF that we can JIT
Branch-free code translates to SkVM more easily than the branchy.

Caveat: the GM is not actually JITing with home-grown JIT today because
that JIT can't gather8, i.e. it can't sample from A8 images yet.  But it
works with SkVM interpreter and JITs with LLVM.

Change-Id: I41a6e1d6dda3a6d89a1150bfc7cbc63fe609d4e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282612
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-09 18:08:36 +00:00
Greg Daniel
34bd2c3ccb Fix PinnedImageTest to make current original context at end.
Change-Id: I6f47bb8aa9d743925ea98d2614058137914e0531
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282637
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-09 18:07:06 +00:00
Robert Phillips
51b3e60c6e Clean up GrText-related headers a bit
GrGlyph.h in particular was a bit out of date

Change-Id: I104a4ec3e417ac39856d2f557c61a0222722266b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282607
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-04-09 17:37:16 +00:00
Mike Reed
7fe6ee30c4 Add markCTM(id) api, to replace functionality of saveCamera.
Will need followups on Vertices and SkSL to use these handles.

Change-Id: If775cb01168f601541e889bfa2421129e505b4a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282416
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-04-09 17:07:36 +00:00
Tyler Denniston
31dc48138c Sort viewer slides by filename when traversing a directory.
Main motivation for this was convenience when rendering directories of
external files (e.g. --svgs) as readdir() does not guarantee any
ordering.

Change-Id: I78dced834e5a3edde4a5e8e0e65ad946c7d3a3fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282617
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-09 16:15:06 +00:00
Mike Klein
5d1c163807 fix JIT min/max
x86 was relatively straightforward to fix... we were
passing the arguments in the wrong order.

As far as I can tell, we cannot use the native ARM instructions.
Instead, test and select.

Change-Id: I3411a72462e5d5f04881f0304318fd1ae8792900
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282316
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-09 14:23:35 +00:00
Florin Malita
0929425f3d [svg] Skip "inherited" presentation attributes
Instead of propagating and attempting to handle at resolution time,
cull "inherited" values in the setters - for inherited-by-default
presentation attributes, "inherited" is the same as not specifying
a property.

Also add some missing setters for more consistent dispatching, and
assert that kInherited never shows up in computed values.

Change-Id: Iceeab4440c5c2eee18a144e2a32704fd29ec5e95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282396
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-04-09 13:34:45 +00:00
Jim Van Verth
332ab60287 D3D fixes to clean up crashes in tests
Filled in a few more methods, almost gets through tests w/o crashing now.

Bug: skia:9935
Change-Id: If3461db366333cd29c762e1afa51a0959c57689d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282275
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-04-09 13:13:54 +00:00
Robert Phillips
297a219dbf Delay creation of GrTextStrike and GrGlyphs until flush time
Bug: 1056730
Change-Id: If7f1101352e6629e1b31bb888e605984ac29f2e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282312
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-04-09 12:25:54 +00:00
Tyler Denniston
b96bb97f09 [SVG] Fix polyline/polygon point parsing
This was evident in the 'shapes-polygon-01-t' SVG.

Change-Id: I4900b9e3626b924291c569a6611fb3b280e3219c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282397
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-04-09 12:20:29 +00:00
Florin Malita
d532bdbc86 [svg] Adjust container size on Viewer window resize
It's nice to be able to resize the SVG container on the fly.

Change-Id: I6624e6151aaff7e2a7f6eb07e84aee88c4a2e408
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282418
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-04-09 12:16:34 +00:00
Florin Malita
5076bd228f [svg] Fix dasharray padding
Use a correct byte count (instead of SkScalar count).

Change-Id: I1b7d38031eacecbb18bf3453998913da68af5a4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282480
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-04-09 12:15:24 +00:00
skia-autoroll
d7bec55520 Roll third_party/externals/angle2 8bd3dab11206..2caf7ffda74f (7 commits)
8bd3dab112..2caf7ffda7

git log 8bd3dab11206..2caf7ffda74f --date=short --first-parent --format='%ad %ae %s'
2020-04-09 xinghua.cao@intel.com Address a TODO for instance uniform block
2020-04-08 geofflang@chromium.org GL: Protect against infinite loops with CONTEXT_LOST in CheckError
2020-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 004b2914bfe3..4db086125947 (9 commits)
2020-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader bdb6807825ac..63ed0e445fa5 (8 commits)
2020-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 122067a02a25..bb8be13e3ffe (1 commits)
2020-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 4af38c49bfee..538512e8e898 (2 commits)
2020-04-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-tools/src 1fbefe048387..444b7cd3eecd (2 commits)

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

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 csmartdalton@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: csmartdalton@google.com
Change-Id: I39e673aa9e459592975ae949a064316fe295aa9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282462
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-09 06:16:13 +00:00
skia-recreate-skps
330286ebf4 Update Go Deps
Change-Id: I1e137174cfccdf9c3b204894863d349abade9c0a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282459
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-04-09 05:36:03 +00:00
skia-autoroll
d4f2f8fe87 Roll ../src 65c03361bcc9..9fa8abd9f4b8 (398 commits)
65c03361bc..9fa8abd9f4


Created with:
  gclient setdep -r ../src@9fa8abd9f4

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 csmartdalton@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: csmartdalton@google.com
Change-Id: I3b5390e712c0d195ac65d602fb328661d3b017f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282436
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-09 04:57:49 +00:00
skia-autoroll
dcf3a9b3dc Roll third_party/externals/swiftshader ba0c95eb406f..3cfa8e28be80 (9 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/ba0c95eb406f..3cfa8e28be80

git log ba0c95eb406f..3cfa8e28be80 --date=short --first-parent --format='%ad %ae %s'
2020-04-09 sugoi@google.com Remove debug only code limiting the number of primitives
2020-04-08 bclayton@google.com Regres: Post coverage results even if the test lists have not changed.
2020-04-08 amaiorano@google.com CMake: split out all src/OpenGL targets into their own CMakeLists
2020-04-08 amaiorano@google.com CMake: split out SwiftShader GL deps into separate files
2020-04-08 amaiorano@google.com CMake: clean up dependencies
2020-04-08 bclayton@google.com Add SystemBenchmarks.
2020-04-08 bclayton@google.com VkCommandBuffer: Remove static Cast() method
2020-04-08 bclayton@google.com Remove src/Device/Config.cpp
2020-04-08 bclayton@google.com Kokoro: Check that build files don't reference non-existent files

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

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 csmartdalton@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: csmartdalton@google.com
Change-Id: Idd3043dfd76f946317cb2ac987606da6ac27d6c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282437
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-09 04:37:13 +00:00
Brian Osman
68219bfaca Add Usage::kColor to SkVertices custom attributes
Always treated as unpremul, RGB(A) sRGB colors. Automatically
transformed to destination color space, and premuled.

Bug: skia:9984
Change-Id: I78fdb16482f70714a8a8b64a9552e8874d7966fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282336
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-04-08 23:57:27 +00:00
Jim Van Verth
5ca3e54301 Fixes for running on the iOS simulator.
* Disable pixel formats not supported by Metal on the simulator
* Work around invalid sample count value in GLES

Change-Id: I711c3d906ef1c0a467dfc1fb5d36eac2277e7ae0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282270
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
2020-04-08 21:11:17 +00:00
Jim Van Verth
185d3d4fa7 Add onMap, onUnmap, and onUpdateData to GrD3DBuffer.
Fills in more methods for GrD3DBuffer. Still needs some
work to be fully functional.

Bug: skia:9935
Change-Id: If8d0be93c77c86d3d3578afcdc598b428c468da5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282136
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-04-08 20:31:37 +00:00
Florin Malita
27aeb12d47 [svg] Reference cycle avoidance
Several SVG constructs reference other elements based on their ID (e.g.
<use>).  This can yield arbitrary reference chains and cycles.

Since all ID-based lookups are funneled through
SkSVGRenderContext::findNodeById(), a straightforward method to break
cycles is to temporarily clear the id->node association following a
lookup -- where "temporarily" refers to the local execution scope.

This approach works for all recursive traversals, as scopes are
nested/released in a natural manner.

  - introduce a scoped node reference wrapper (BorrowedNode), which
    clears the id mapping for its lifetime and restores it upon
    destruction
  - update findNodeById() return BorrowedNode values
  - update call sites as needed

Change-Id: I2ec5539b24e23b4fbbaff01a44460c41190028e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282271
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-04-08 20:04:17 +00:00
Brian Salomon
dc8fcdb735 Add getter for channels to GrBackendFormat
Bug: skia:10078

Change-Id: I0172a87d836a606a55e60b73ba255a41313e9c12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282266
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-04-08 19:54:27 +00:00
Tyler Denniston
d1e5b030fd [SVG] Fix application of skewX/skewY attributes
The SkMatrix setSkew functions set the matrix value directly, so we need
to treat the angle according to
https://www.w3.org/TR/SVG11/coords.html#SkewXDefined

Change-Id: I3a47e4e98724ef71f39a00dc2f07c8bf430de747
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282268
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Tyler Denniston <tdenniston@google.com>
2020-04-08 19:51:47 +00:00
Mike Reed
d2c24c8aad more infixifcation -- no functional change
In general, I removed local helper functions, but not always...
in a few places, imho, mad() or mma() still made it a little easier to
read, but easy to change my mind if someone suggest they be 'inlined'.

No pixels diffs afaik

Change-Id: I15b6e611d3e367d7cd30d807369c64b00652157f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281860
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-04-08 19:22:16 +00:00
Mike Klein
210288fdcd add SkVM_min_max unit test
Tests min() / max() float behavior fairly exhaustively.

We sometimes specialize into min_f32_imm and max_f32_imm, so it's
important to test with constant values as each argument to cover that
specialization, and to test with both as non-constant values to cover
when that specialization does not apply.

Change-Id: Ib021fd5a6d322058af2f504048b9ed02d0510732
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282315
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-04-08 19:05:36 +00:00
Mike Klein
3150d88ba4 add Pixel CPU Test jobs
We lost some coverage here when the Shields died.

We've had the ASAN Test jobs, which is good, but there are
a few code paths that go differently when run under ASAN,
particularly the SkVM JIT.

Change-Id: Ia120e55f16ddd4cd12d8bd78d62a53c7542fec13
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282318
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-04-08 18:43:06 +00:00
Greg Daniel
8561fc23c9 Update gpu flush semaphore contract.
From my scanning of clients this should not change how any of our main
users interact with semaphores. The biggest change here is that we don't
give up on submitted all the semaphores if a creation fails. We just
submit the semaphores we do have. It also makes it explicit that the
client is responsible for deleting any initialized semaphore regardless
if we were able to submit the semaphores or not or if the semaphore was
wrapped or created by Skia.

The motivation for this change is to more align the current API with
how things will work when we separate flushing and submit into different
calls.

Bug: skia:10118
Change-Id: I3e8b5d3a9852ddb2b5dc972fee21bf46ded7a36f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282265
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-04-08 17:30:16 +00:00
Stephen White
f3d5d44ec9 Dawn: staging manager rewrite.
Using many small staging buffers is quite costly for performance, for
example when there are many small texture uploads (such as MotionMark's
"canvas bouncing clipped rects" test).

Instead, the new manager uses buffers of 32K minimum, and returns
suballocations of those.

For now, allocation is simply iterates through the list of staging
buffers and returns the first one with enough remaining space.
This is O(N) in the number of staging buffers, which should be
ok since there are fewer of them. (If it becomes a hot path, we
can optimize it later.)

This also subsumes the UBO-specific staging buffer, since that one
did much the same thing but did not reuse staging buffers.

Change-Id: I4fddee8bb0fc602c49fe552acc327a640bf6917b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/279921
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-04-08 16:11:48 +00:00
Florin Malita
f005c25684 [SVG] Fix spec links
Lock to SVG 1.1, where they were originally pointing.

Change-Id: I9c770983137375f1daa84a2d0927b5e44f93e7b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282264
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-04-08 15:48:08 +00:00
Mike Klein
5492a0c8d0 stifle leaks in terminator_CreateDevice()
We think this is the driver's problem and not ours, right?

Change-Id: I2c94ee904c7ca4844a5e91291b10b0efa8ce3806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282298
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-08 15:28:48 +00:00
Mike Klein
df4b5bff0d get skvm/llvm building again
i8x4/I8x4 are unused since removing Op::bytes,
and since LLVM 10 we need to include IntrinsicsX86.h.

Change-Id: Ib4b60a31bb55b0f22a74c4c6b6ae5e50d075235f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282185
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-08 15:21:48 +00:00
Mike Klein
97cdd6a4ce narrow use of fast_unwind_on_malloc=0
Looks like our bots took anywhere from a 2x to 25x slowdown hit
from using this flag.  Let's keep it only where we think we need
it, Test-...-ASAN_Vulkan bots.

Change-Id: Ied7c0a744fafa307f4ad0e7f82c62445b2cc1e61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282297
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-08 15:18:18 +00:00
Mike Klein
b19ed123bd shard ASAN bonusconfigs bot
The bot times out after ~13 hours now, so let's try 16 shards.

Change-Id: I26e350a2e9d1875d01c65f921212277031c92ca3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282296
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-08 14:30:20 +00:00
Jim Van Verth
f6860405e1 Use fuzzier definition of zero-length segments in compute_intersection.
When working with segments in compute_intersection, we're often dividing
by the length squared. If that's 0, we'll end up dividing by 0. This
effectively puts a lower bound on the size of segment we can determine
intersections with other than treating it like a single point. We
arbitrarily choose the first endpoint as this point.

Bug: oss-fuzz:20009
Change-Id: I7581922f704ff8cef77456a80159cdb8ba3b716f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282160
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-04-08 11:13:18 +00:00
Corentin Wallez
6a5187a889 PRESUBMIT: Don't check formatting of deleted files
Change-Id: I78eff440486eb2e76acdbd8a43c6c99cf6ed9bbb
Bug: chromium:1064305
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282276
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2020-04-08 10:36:09 +00:00
skia-recreate-skps
4045cd82e7 Update Go Deps
Change-Id: I0140df57574244bade5dbee12bea839319185f77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282231
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-04-08 06:31:18 +00:00
skia-autoroll
69ac873433 Roll third_party/externals/angle2 eb298a024032..8bd3dab11206 (12 commits)
eb298a0240..8bd3dab112

git log eb298a024032..8bd3dab11206 --date=short --first-parent --format='%ad %ae %s'
2020-04-08 timvp@google.com Create Context::getActiveLinkedProgram()
2020-04-07 b.schade@samsung.com Vulkan: add support for EXT_texture_sRGB_R8
2020-04-07 geofflang@google.com Depend on vulkan headers in angle_gpu_info_util
2020-04-07 geofflang@chromium.org Set sdk_version for cc_genrules used by modules with sdk_version set
2020-04-07 jmadill@chromium.org Vulkan: Add VulkanMemoryAllocator to DEPS.
2020-04-07 ynovikov@chromium.org Feature::condition must not be NULL
2020-04-07 jmadill@chromium.org Vulkan: Clean up robust and emulated image clears.
2020-04-07 jmadill@chromium.org TextureGL: Signal DirtyBitsChanged on dirty bits.
2020-04-07 jmadill@chromium.org Don't call syncState inside FBO queries.
2020-04-07 jmadill@chromium.org Vulkan: Pass RendererVk to BufferHelper::destroy.
2020-04-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src bb74deab0a4d..122067a02a25 (4 commits)
2020-04-07 shrekshao@google.com Hook up several drawElements variants in Context11

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

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 csmartdalton@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: csmartdalton@google.com
Change-Id: I021427e018df3293533ca70a5932cd6b597a40cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282228
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-08 05:34:38 +00:00
skia-autoroll
34b673b43b Roll third_party/externals/swiftshader b4a27407e2be..ba0c95eb406f (5 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b4a27407e2be..ba0c95eb406f

git log b4a27407e2be..ba0c95eb406f --date=short --first-parent --format='%ad %ae %s'
2020-04-07 bclayton@google.com Regres: Fix uncovered calculations after optimizations
2020-04-07 bclayton@google.com Regres: Optimize coverage processing
2020-04-07 bclayton@google.com Regres: Re-populate treeFile.allSpans on parse.
2020-04-07 bclayton@google.com Update third_party/marl/BUILD.gn with new files
2020-04-07 bclayton@google.com Update Marl to 539094011

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

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 csmartdalton@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: csmartdalton@google.com
Change-Id: Ie36d699c03b21660900c699aadc58b84562c07a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282227
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-08 05:32:48 +00:00
skia-autoroll
1c60f2c2af Roll ../src ebd295df4e31..65c03361bcc9 (379 commits)
ebd295df4e..65c03361bc


Created with:
  gclient setdep -r ../src@65c03361bc

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 csmartdalton@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: csmartdalton@google.com
Change-Id: I947bcefd31439687b1eca9f75cf1d40453f0c12d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282226
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-04-08 05:26:38 +00:00
Mike Klein
4654d46260 add third stack-only jit strategy
Once again, coloremoji_blendmodes is asserting...
but otherwise seems ok.

Change-Id: I52eb8c0d1542913b6f1e69a5a5cdbb560366a7fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282178
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-04-08 01:15:17 +00:00
Mike Klein
eb7784e077 temporarily disable backend-specific min/max f32 impls
Change-Id: I1fe5da641f607cad190f13cbaf4d636d2f8b0598
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282189
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-04-08 00:08:07 +00:00
Ben Wagner
ecd17b9e34 Add fast_unwind_on_malloc=0 to xSAN.
It is slower, but gives useful stack traces for suppressions.

Change-Id: I64e1b24951ffb87defd2201743ebb32f31b1f90f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282159
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-04-07 22:31:57 +00:00
Mike Klein
07b2bafbbc build conservative stack frame on x86-64
Should be a behavior no-op, and effective perf no-op.

Change-Id: Iaf755c6938ae5060f11b1ccb83a9273fa53896b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282176
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-04-07 21:34:47 +00:00
Mike Klein
5e9f0ee13f add and test stack load/store
Change-Id: Ie0d29e31bd8c156ecd46cd658b5a4c53d8d2e11d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/282115
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-07 21:15:47 +00:00