Commit Graph

46766 Commits

Author SHA1 Message Date
Chris Dalton
3ffa7af753 Split uniform and texture uptades to different methods in GrGLProgram
Change-Id: Iaa167642a0593836773c256737e1828b38beeef7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272504
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-21 00:13:58 +00:00
Brian Salomon
df283d01ca Revert "Remove GrDeviceSpaceTextureDecalFragmentProcessor."
This reverts commit af5f9f008d.

Reason for revert: bad GM results on Metal

Original change's description:
> Remove GrDeviceSpaceTextureDecalFragmentProcessor.
> 
> It was used to sample clip masks using device coords.
> 
> Replace with a more generic GrDeviceSpaceEffect that simply calls a
> child FP with sk_FragCoord.
> 
> Also fix issue in GrQuadPerEdgeAA GP. It wouldn't setup coord transforms
> at all if they are all applied in the FS (explicit coords). Moreover,
> the GrGLSLGeometryProcessor::emitTransforms() helper required a valid VS
> var for local coords even when all FPs use explicit coords and wouldn't
> use a local coords var.
> 
> Make CPP SkSL code gen for clone copy the explicit coord status of
> children.
> 
> Change-Id: Ib8bb36028354405c8012f6e91e9eb46db75d16a6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271658
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: Ie02951dcc037d282dc3829cad216a0a0c9474038
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272518
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-20 22:38:48 +00:00
Brian Salomon
af5f9f008d Remove GrDeviceSpaceTextureDecalFragmentProcessor.
It was used to sample clip masks using device coords.

Replace with a more generic GrDeviceSpaceEffect that simply calls a
child FP with sk_FragCoord.

Also fix issue in GrQuadPerEdgeAA GP. It wouldn't setup coord transforms
at all if they are all applied in the FS (explicit coords). Moreover,
the GrGLSLGeometryProcessor::emitTransforms() helper required a valid VS
var for local coords even when all FPs use explicit coords and wouldn't
use a local coords var.

Make CPP SkSL code gen for clone copy the explicit coord status of
children.

Change-Id: Ib8bb36028354405c8012f6e91e9eb46db75d16a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271658
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-20 22:09:58 +00:00
Brian Salomon
7fba244ea9 Remove copies for wrap modes in GrTextureProducer.
GrTextureEffect now supports implementing wrap modes in shaders
for subsets and texture types with HW sampling restrictions.

Change-Id: I5c93ade044465e13c5f56f7437fbbe288db0a8a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271056
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-20 22:09:48 +00:00
Brian Salomon
706851dc99 Fix issue where GrQuadPerEdgeAA GP doesn't emit coord transforms
This happens when all the FPs are sampled with explicit coords.

The GrGLSLGeometryProcessor::emitTransforms() helper required a valid VS
var for local coords even when all FPs use explicit coords and wouldn't
use a local coords var. It now only requires the variable be valid if
there is an FP with a coord transform that is not explicitly sampled.

Change-Id: I8008e854c738a17b207c82bb791e230ef4d5364d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272459
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-20 21:18:48 +00:00
Dominic Mazzoni
6ffabbb4c4 Simplify interface to StructureElementNode.
Use a std::vector of std::unique_ptr for the children, rather than an
error-prone raw pointer.

Use a string for the element type, rather than an enum.

In both cases, both the old and new format are supported and tested
within Skia until Chromium has migrated.

Also add support for Alt and Lang, which are like attributes
but go right on the structure node. There are only a small
handful of attributes that go on the structure node so this
seems like the simplest solution.

Bug: chromium:607777
Change-Id: I4f315685df35dd9dcd8e1bca6d275cbeb8f2c67a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271816
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
2020-02-20 21:16:48 +00:00
recipe-roller
1d589a578c Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools) into this repository.

depot_tools:
  https://crrev.com/d55c50771361fa0295d9e14b6ab061db042c7772 (ehmaldonado@google.com)
    git-cl: Mock DieWithError and GitSanityTests
  https://crrev.com/7aa682406ad41624826d76a7285d1ccdc0940fab (John.Emau@microsoft.com)
    gclient: setdep writes binary for windows newline support

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I3635588e85e6e63171ca7f0d9384a6e2c0fa8849
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272463
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>
2020-02-20 20:24:18 +00:00
Michael Ludwig
e6c3f9fbb8 Use scalar instead of int for offset in drop shadow filter
The scenario has an image bounds where the dimensions are reasonably sized
but the origin is at the int32 max, so calculating the difference between
the input and output can overflow. In this case, the two offsets were ints
but were immediately being passed to canvas->translate as a scalar, so this
just lifts each term into SkScalar first.

Bug: chromium:994037
Change-Id: Ifd65eea78560c91fb3d07d69598f7478aea00d5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272457
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-02-20 20:19:39 +00:00
Brian Salomon
b243b4389f Make SkSL CPP code gen copy explicit coord status for cloned FPs
Change-Id: I1479136de8fcab32e2be661fd5fae020b319aab8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272458
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-20 20:12:48 +00:00
Robert Phillips
ca85b9b8e3 Add temporary header to shift clients over to include/core/SkDeferredDisplayList.h
The plan is:
Add SkDDLTmpRedirect.h
update clients to point to SkDDLTmpRedirect.h
Move SkDeferredDisplayList.h to include/core (and update SkDDLTmpRedirect.h)
update clients to point to SkDeferredDisplayList.h in its new location
remove SkDDLTmpRedirect.h

This staging is required to land:

https://skia-review.googlesource.com/c/skia/+/272343 (Move SkDeferredDisplayList.h into include\core)

Change-Id: I3302cdb8607b259d084bb9dd00600652c7f9a93a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-20 20:12:38 +00:00
Greg Daniel
5725e9b554 When glSync is not available on android fake it out with EGL for our tests.
Change-Id: Ie1c98f1927146cce938204c2ea60899887a3bcea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271746
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-20 19:49:34 +00:00
Brian Salomon
b10a6625ba GrFP::coordTransformsApplyToLocalCoords() -> GrFP::isSampledWithExplicitCoords()
Also rename and flip meaning of the internal flag.

Change-Id: Icf3437fa271da26037690c9a5083adb862a69233
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272379
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-02-20 19:34:46 +00:00
Julia Lavrova
62076977a0 Bugs
Change-Id: I3d45c6c8cef0109377812de0a3aab5d457a29b86
Bugs: skia:9849, skia:9850

9849 is related to font resolution (we may have to try different fallback
fonts to resolve all codepoints)
9850 is related to finding a position inside a glyph ("ffi" is an example)

Change-Id: I3d45c6c8cef0109377812de0a3aab5d457a29b86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271745
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-02-20 18:35:23 +00:00
Florin Malita
0de01c05b7 [skottie] Clip overflowing paragraph lines
AE discards lines with baselines outside the paragraph box.

This aligns Skottie's behavior with AE for default/top-alignment
(but not for any of the custom vertical alignment modes).

Bug: skia:9933
Change-Id: Id0318f0744bf89580774e89494faf19bfb6f6d14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272376
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-02-20 18:35:15 +00:00
Herb Derby
5e5e848770 Revert "Multi-threaded strike cache"
This reverts commit a6cd7c0b1f.

Reason for revert: Introduced nullptr de-ref in last patch

Original change's description:
> Multi-threaded strike cache
> 
> Allow multiple threads to share the same strike. The old
> system of removing the cache from the linked list is no longer.
> The strikes stay in the list and can be found by other threads.
> 
> * Removed strike size verification. There was no way to get the
> locks to work out. The whole point of the change was to have multiple
> threads muting the structure at the same time.
> 
> * Strikes are now refed instead of being checked out. Therefore,
> ExclusiveStrikePtr is now just wraps an sk_sp, and should be renamed
> in a future CL.
> 
> Change-Id: I832642332a3106e30745f9cdd3156ae72d41fd0b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272057
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

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

Change-Id: Ie1acd9b42e614c17cb63bda1b3fd4dd9827a8fa6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272378
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-02-20 18:30:13 +00:00
Herb Derby
a6cd7c0b1f Multi-threaded strike cache
Allow multiple threads to share the same strike. The old
system of removing the cache from the linked list is no longer.
The strikes stay in the list and can be found by other threads.

* Removed strike size verification. There was no way to get the
locks to work out. The whole point of the change was to have multiple
threads muting the structure at the same time.

* Strikes are now refed instead of being checked out. Therefore,
ExclusiveStrikePtr is now just wraps an sk_sp, and should be renamed
in a future CL.

Change-Id: I832642332a3106e30745f9cdd3156ae72d41fd0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272057
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-02-20 18:10:43 +00:00
Robert Phillips
7b0ed557a9 Start precompiling DDL shaders
This is through a private API but it, at least, connects things end-to-end.

Bug: skia:9455
Change-Id: Ib34d49c5c4e4cfa5fa599afc5c967fcadc3de10e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268627
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-02-20 18:08:13 +00:00
Chris Dalton
4386ad19fb Add GrOpsRenderPass::bindPipeline()
Clients now must call bindPipeline() before drawing.

Also renames GrOpsRenderPass::draw() to drawMeshes(), in order to
ensure every call site gets updated. drawMeshes() will soon be
replaced by individual calls for each draw type (indexed, instanced,
indexed-patterned, indirect, etc.).

Change-Id: I93ef579ded7d0048c5aa1bf1d7c0eb7bc1cd27b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270424
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-02-20 16:47:13 +00:00
Robert Phillips
979b223056 Add private GrContext::compile API (take 2)
Currently this is only implemented for GL.

Bug: skia:9455
Change-Id: I851471d6334d6a38e6fde3a46f09b7dc0209fb78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272346
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-20 16:24:03 +00:00
Robert Phillips
57a3ded673 Revert "Add private GrContext::compile API"
This reverts commit 0cd68ab14a.

Reason for revert: unimplement pure virtual

Original change's description:
> Add private GrContext::compile API
> 
> Currently this is only implemented for GL.
> 
> Bug: skia:9455
> Change-Id: I8f369273b697e80a4bade5dd2283e66df688f0ec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271742
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: If273a3328cfff759e213e9be02eb63c3725ea0f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272342
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-20 15:21:23 +00:00
Mike Reed
bd3de19f79 clean up leftovers from 3d samples
Change-Id: Ifb2414932d43ea3fafe7226dccb4acafdc41a07d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272337
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-20 14:58:53 +00:00
Robert Phillips
0cd68ab14a Add private GrContext::compile API
Currently this is only implemented for GL.

Bug: skia:9455
Change-Id: I8f369273b697e80a4bade5dd2283e66df688f0ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271742
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-20 13:51:23 +00:00
Robert Phillips
291f3405f3 Add new gpu sink for DDLs
Having this as a sink rather than a Via allows us to do more aggressive things with threads and shared contexts.

Change-Id: I3ca1076686fa4f53387c12a9506e01910c1bc3e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-02-20 13:51:07 +00:00
Mike Reed
9d4e31d6cd rm Sk3D.h -- long live SkMat4
Change-Id: Ib83ee6567b1a32f34364b7ac66a659eaeced3249
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272037
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-20 13:15:33 +00:00
skia-autoroll
2c2db27628 Roll third_party/externals/angle2 fa9eff37c38a..2801bf43716e (16 commits)
fa9eff37c3..2801bf4371

git log fa9eff37c38a..2801bf43716e --date=short --first-parent --format='%ad %ae %s'
2020-02-19 ynovikov@chromium.org Add .vscode to .gitignore
2020-02-19 jmadill@chromium.org Refactor test parameters to TracePerfTest.
2020-02-19 jmadill@chromium.org Vulkan: Lift failing test suppression.
2020-02-19 ynovikov@chromium.org Roll chromium_revision 8ffb18d0b9..a9ad696264 (736949:742676)
2020-02-19 pmberube@google.com Add missing #include to fix build with GCC 10.
2020-02-19 jmadill@chromium.org GN: Update trace tests build.
2020-02-19 syoussefi@chromium.org Vulkan: Fix SPIR-V transformation name-info association
2020-02-19 flibitijibibo@gmail.com Remove getIndexRange call from ValidateDrawRangeElementsBaseVertex
2020-02-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 0bd30e43c007..39e685ccd37e (2 commits)
2020-02-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-tools/src fb2272297f00..16cf5591e399 (1 commits)
2020-02-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 77fefe765c06..79f8caf9154a (2 commits)
2020-02-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader 0bbf7ba9f909..8def9063c4fd (2 commits)
2020-02-19 jmadill@chromium.org Reland "Use newer OSX SDK for iOS"
2020-02-19 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 873e416c2d07..f155ccfd202d (13 commits)
2020-02-19 cwallez@chromium.org Revert "Move sampleAlphaToCoverage out of blendState"
2020-02-19 cwallez@chromium.org Revert "Provide default implementation of rx::DisplayEGL"

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

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 lovisolo@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: lovisolo@google.com
Change-Id: I8e089e3db52aaf3a21ce4864680a277a0ad88199
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272224
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-20 05:10:32 +00:00
skia-autoroll
a509735421 Roll third_party/externals/swiftshader 8def9063c4fd..74d3f371f201 (1 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/8def9063c4fd..74d3f371f201

git log 8def9063c4fd..74d3f371f201 --date=short --first-parent --format='%ad %ae %s'
2020-02-20 sugoi@google.com Array length fix

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

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 lovisolo@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: lovisolo@google.com
Change-Id: Ib0c2856194d76d7c88668de148de24299e7b202f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272225
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-02-20 04:41:32 +00:00
recipe-roller
ed1ff23c27 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools) into this repository.

depot_tools:
  https://crrev.com/56c9bd5a73595d6ee86bf53dcb995e97f0fe6366 (vapier@chromium.org)
    repo: update to 2.4 launcher

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I93898b01185be17dd92886189a550fb30c4b5602
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272141
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>
2020-02-19 23:48:44 +00:00
Florin Malita
a3e8266117 [skottie] Add warning for missing text/paragraph box
Text auto-scaling requires an explicit paragraph box.

Change-Id: If3ba91051cd5fa8456fc8530d7ed7ad4c663fff9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272119
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-02-19 23:37:04 +00:00
Sean Gilhuly
b6c2bb0030 Turn off mip map support in GrDawnCaps
GrDawnGpu::onRegenerateMipMapLevels() is not implemented. Set mip map
support to false in GrDawnCaps so that the function is not called.

Change-Id: I342c59d171d21250ee4da400f58b6da54a04ca8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272139
Commit-Queue: Sean Gilhuly <sgilhuly@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-02-19 23:36:04 +00:00
Mike Reed
e1a81bad5f move SkVec2 into shared header
Change-Id: I2b39242fe0519fa188151974dea883bad5652eb4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272118
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-19 23:27:04 +00:00
Mike Reed
23823669b3 simplify rotation calc
Change-Id: I371f8808dbb6b22dfccd7044f862141b48c4dcf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272117
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-19 22:54:44 +00:00
Herb Derby
9baef3593c Have SkStrikeCache track memory usage
Have the SkStrikeCache track all memory usage. This
moves all the validation code to the SkStrikeCache and
out of the SkScalerCache.

* Some header cleanup.

Change-Id: I9c0a3bb217299deed12223221e2bb5fd09eadb39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-02-19 22:31:14 +00:00
Brian Osman
c0243914b2 Reland "Add SkSLCompiler::toHLSL, using SPIRV-Cross"
This reverts commit e3f57a4e62.

Change-Id: I03293dbee19ef5c9802fc35de8438a87f627cf96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272056
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-19 21:46:14 +00:00
recipe-roller
9d42df8bb2 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools) into this repository.

depot_tools:
  https://crrev.com/6693d0929f11f7799b6b1185498c658566d9f356 (raul@tambre.ee)
    gclient_eval, gclient_utils: Fix Python 3.9 removal of collections members
  https://crrev.com/7677e5ccc06bde3297fb0475bf96d8cf88f8b4e9 (ehmaldonado@google.com)
    git-cl: Mock GetChangeDetail on tests.

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I38354a5fb6918c7824bc74a03c5294d1e733693e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272030
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>
2020-02-19 21:20:14 +00:00
Dominic Mazzoni
7dfb46e7f3 Re-land: Support adding attributes to PDF document structure nodes.
Originally landed: https://skia-review.googlesource.com/c/skia/+/268878
Reverted: https://skia-review.googlesource.com/c/skia/+/271858

The issue was with compilation when PDF support is disabled. See
the diff between patchsets 1 and 2.

This is an important part of writing a tagged PDF. Many of the nodes
in the document structure tree need additional attributes, just like
in HTML.

This change aims to add support for a few useful attributes, not to
be comprehensive.

Bug: chromium:1039816
Change-Id: I15f8b6c41d4fdaa4b6e21775ab6d26ec57eb0f5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271916
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2020-02-19 20:50:14 +00:00
Jim Van Verth
d2d4c5e8c5 Add GrD3DGpu and GrD3DCaps.
With this, can specify d3d config for dm and it will create a GrContext
with GrD3DGpu (stubbed in).

Bug: skia:9935
Change-Id: I0b8635bc541c61833b08b60a9f6e1341d1373090
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271743
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-02-19 20:44:14 +00:00
Chris Dalton
dc2b15e99f Remove a GL optimization that disabled large scissors
Removes an optimization from GrGLGpu that disabled scissor when the
scissor rect contained the entire viewport. This is incompatible with
the dynamic state world where scissor test is enabled during pipeline
bind, and then only the scissor rect is updated between draws. It also
might actually be an un-optimization since scissor test enable state
can be more expensive to change than the rect.

Change-Id: Iadb14e2b5fbebde3fe71bc0dfdaeb979617bb80b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271939
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-19 20:40:24 +00:00
recipe-roller
a6350f021e Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools) into this repository.

depot_tools:
  https://crrev.com/269640724f824eff2b21faeebb2b44bf84fa5881 (ehmaldonado@google.com)
    git-cl: Use scm.GIT.GetConfig in more places.

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I372ad88ccb59e8a304e152d1434445d5f62b8c59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272020
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>
2020-02-19 20:02:00 +00:00
Brian Osman
e3f57a4e62 Revert "Add SkSLCompiler::toHLSL, using SPIRV-Cross"
This reverts commit cf7c7e38e8.

Reason for revert: Breaking our Flutter build.

Original change's description:
> Add SkSLCompiler::toHLSL, using SPIRV-Cross
> 
> Change-Id: Ia7a11a726cac006f6acc36efe8fc2ff27f30af72
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270837
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=jvanverth@google.com,bsalomon@google.com,brianosman@google.com,ethannicholas@google.com

Change-Id: I2a1353864e2225578271573a8f7157d95fb0c969
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271744
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-19 19:53:30 +00:00
recipe-roller
9bd3d98512 Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools, recipe_engine) into this repository.

depot_tools:
  https://crrev.com/1fbe7c0bb24be4d6460cf83b1aa4750ab4a46933 (tandrii@chromium.org)
    Roll lucicfg tool to @ 3b479f0e v1.12.3.
  https://crrev.com/10e0e6d6c19ac3ca5e1ac5667e7772f65f1f8ff8 (tandrii@chromium.org)
    Roll bb tool to @ 37d99607
recipe_engine:
  https://crrev.com/a7a70da79ed53f56f5150bb7d1eb577aca51c457 (yiwzhang@google.com)
    [bb] Fix the bug that search api only returns 1000 builds max when limit>1000
  https://crrev.com/90eb05b0df05f7840e58ff3c9f3685af0c89a27d (guterman@google.com)
    Add --stop flag to run/train which fails fast

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.

TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I5be97222dd94277b828f837dc99d98f5eb3ced86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271739
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>
2020-02-19 19:30:00 +00:00
Mike Reed
5263837748 add fling to rotating cube
Change-Id: I4eb9a64cf41b088fca239cc7877b9dc9870d14ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271863
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-02-19 19:29:27 +00:00
Brian Osman
cf7c7e38e8 Add SkSLCompiler::toHLSL, using SPIRV-Cross
Change-Id: Ia7a11a726cac006f6acc36efe8fc2ff27f30af72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270837
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-02-19 19:15:21 +00:00
Julia Lavrova
c7a9a074e1 Bug fixes
Change-Id: I2b4b210301584c23a3b9325ebfdfdd9e6c4712d1
Bug: skia:9881, skia:9882
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271865
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-02-19 19:01:21 +00:00
Mike Klein
28abea51fa dip our toes into c++11 style [[attributes]]
AFAIK, we can replace a lot of preprocessor tests now that we have
[[attributes]] and compilers are supposed to ignore unknown attributes.
Let's see if it works. If this sticks I'll get the rest in a big CL.

-Wattributes and MSVC warning C5030 are kind of annoying as errors,
so turn them off.  This does not bode well for rolling into clients.

Change-Id: I88b150bab746c5510ff94f604096bf0ee0c9f96a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271886
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-02-19 17:51:40 +00:00
Corentin Wallez
55a3ea0a11 Fix compilation of Dawn backend after GrMesh/GrPrimitiveType change
Change-Id: Ia37863dacffacd344086fa513baa9c274443554c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271836
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-02-19 17:32:31 +00:00
Julia Lavrova
212bf079de layout/relayout with different widths and justification
Change-Id: I2f6d9121a97d3dc12981e0aaf420c56a8f7e05eb
Bug: skia:9851, skia:9875
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271536
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-02-19 16:37:14 +00:00
Chris Dalton
5a5fe79ebf Improve the mechanism to suppress warning messages during testing
It's important to suppress warning messages during tests that
intentionally trigger them, in order to not confuse users. This CL
attempts to make the suppression mechanism more general, and then
suppresses another warning that has started coming out in dm.

Bug=skia:9927
Change-Id: I67b5bcd1865f4001964bbdc967b0327682b4258b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271177
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-02-19 16:34:09 +00:00
Jim Van Verth
71275fc37c Reland "Manage renderCmdEncoder over lifetime of GrMtlOpsRenderPass."
This is a reland of 53a72c1b50

Original change's description:
> Manage renderCmdEncoder over lifetime of GrMtlOpsRenderPass.
> 
> Rather than create a renderCmdEncoder per draw, we create it up front
> and each draw just uses it. On a clear or upload we switch away and
> then recreate it.
> 
> Bug: skia:
> Change-Id: Ic6d612119ed3f7c41183d0186083deae14f96398
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270841
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Bug: skia:
Change-Id: I0fe765a5fde7f6643adce2d5d5ab37c2ad930a5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271862
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-02-19 16:32:09 +00:00
Mike Klein
5f1ad0dc47 rm release swiftshader msan bots
They're not any faster than the debug ones.

Change-Id: I793706d36bd868277db2b6e39a53cb4e1075e0b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271880
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
2020-02-19 15:32:01 +00:00
Brian Osman
d3b3bf3567 Reland "Move runtime shader/colorfilter into SkRuntimeEffect.cpp"
This reverts commit 7281a86237.

Change-Id: I1759358ede39e2466362cc4d3f0b9530eff08c9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/271656
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-02-19 15:29:09 +00:00