Commit Graph

50359 Commits

Author SHA1 Message Date
Mike Reed
15a5403cd3 Migrate to using SkPathBuilder
Change-Id: I86a75670d7b919313747175ca3e49ef7472061fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310977
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-17 14:17:49 +00:00
Robert Phillips
6704bc87d2 Better encapsulate the GrDrawOpAtlas w/in the GrSmallPathAtlasMgr
This brings the GrSmallPathAtlasMgr into closer correspondence with
the GrAtlasMgr.

It also centralizes where we update the GrSmallPathShapeData's
atlas information.

Change-Id: I892be262a85b3878dbd7f71b0503208943203d46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310476
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-17 14:15:59 +00:00
Derek Sollenberger
866d2894eb Add android:exported values to all SkQP activities.
This fixes an issue on newer versions of Android where activities
with intent filters need to specify whether or not they are exported
in order to successfully complete installation on a test device.

Bug: b/163792247
Test: successful install on device with AOSP build
Change-Id: Iddeb27af55245e926dbf43c03ab48b257461188d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309980
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-08-17 13:33:09 +00:00
skia-autoroll
c4245f475b Roll ANGLE from eb85c0213d43 to a9b199b05c1f (12 revisions)
eb85c0213d..a9b199b05c

2020-08-17 cnorthrop@google.com Capture/Replay: Add ability to override entry points
2020-08-14 jmadill@chromium.org D3D: disable to translate uniform block to StructuredBuffer
2020-08-14 jmadill@chromium.org Reduce spam in native perf tests.
2020-08-14 jmadill@chromium.org Vulkan: Switch buffer barrier check.
2020-08-14 nguyenmh@google.com Add unittests of ANGLE commit message format check
2020-08-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 61bf3be73c1e to 527e67e9d933 (1 revision)
2020-08-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 6b0de7007af5 to 1980311465cf (2 revisions)
2020-08-14 msisov@igalia.com X11 and Ozone: fix compilation of tests.
2020-08-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from cda86eff6461 to abe07b943855 (1 revision)
2020-08-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from df859f77dab3 to b4c4da3e7606 (2 revisions)
2020-08-14 ynovikov@chromium.org Create dummy DEPS entry for Chromium.
2020-08-14 ynovikov@chromium.org Reenable AttributeLayout end2end tests on Linux SwANGLE

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 stani@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/+doc/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: chromium:1085700,chromium:1112112
Tbr: stani@google.com
Test: Test: Capture and play back first 1200 frames of COD.
Change-Id: I9d496392e0c1668a7d347fae3c7583d903deddf7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310998
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-17 04:45:39 +00:00
skia-autoroll
fc225ed21e Roll Chromium from 00c099ff627a to 39dd8685cfa7 (521 revisions)
00c099ff62..39dd8685cf

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 stani@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/+doc/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
Tbr: stani@google.com
Change-Id: Icf5c5d85dc597fc7535f9655eb1686580b4a6d76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310996
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-17 04:40:39 +00:00
skia-autoroll
d882e93e41 Roll dawn from d315022be5b7 to 5e9b29fab92d (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/d315022be5b7..5e9b29fab92d

2020-08-14 enga@chromium.org Fix ASSERT in WindowsDebugLogger
2020-08-14 enga@chromium.org end2end_tests: Forward Windows debug messages to stderr
2020-08-14 cwallez@chromium.org Remove deprecated wgpu::BufferCopyView members

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I189e000ba90520c4ce4ae7fafa65ebccb27c10ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310997
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-17 04:29:39 +00:00
Herb Derby
7491e8b30f inline routine small routines
Inline small routines from the AtlasLocator.

With these routines inlined, the benchmark drops from 402ns -> 302ns.
Over the past couple of CL the total drop is 502ns -> 302ns.

Change-Id: I7de899c20dc6759db1b70c036e319a56da44a13b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310758
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-16 16:40:38 +00:00
John Stiles
a008b0fa8b Enable ClangTidy check readability-redundant-smartptr-get.
To my surprise, this even works with homegrown smart pointers (such as
SkTLazy).

https://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-smartptr-get.html

Find and remove redundant calls to smart pointer’s .get() method.

Examples:

  ptr.get()->Foo()  ==>  ptr->Foo()
  *ptr.get()  ==>  *ptr
  *ptr->get()  ==>  **ptr
  if (ptr.get() == nullptr) ... => if (ptr == nullptr) ...

Change-Id: I8ff541e0229656b4d8e875c8053a7e6138302547
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310976
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-16 15:56:48 +00:00
John Stiles
c1c3c6d70d Enable ClangTidy flag bugprone-suspicious-string-compare.
https://clang.llvm.org/extra/clang-tidy/checks/bugprone-suspicious-string-compare.html

Find suspicious usage of runtime string comparison functions.
This check is valid in C and C++.

Checks for calls with implicit comparator and proposed to
explicitly add it:

  if (strcmp(...))       // Implicitly compare to zero
  if (!strcmp(...))      // Won't warn
  if (strcmp(...) != 0)  // Won't warn

Checks that compare function results (i,e, strcmp) are compared to valid
constant. The resulting value is

  <  0    when lower than,
  >  0    when greater than,
  == 0    when equals.

A common mistake is to compare the result to 1 or -1:

  if (strcmp(...) == -1)  // Incorrect usage of the returned value.

Additionally, the check warns if the results value is implicitly cast
to a suspicious non-integer type. It’s happening when the returned
value is used in a wrong context:

  if (strcmp(...) < 0.)  // Incorrect usage of the returned value.

Change-Id: I001b88d06cc4f3eb5846103885be675f9b78e126
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310761
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-16 03:54:08 +00:00
Brian Osman
d4a040e8b2 Remove obsolete support for sk_InColor in GrSkSLFP
There is no way to get a variable with that builtin identifier (it's
going away entirely soon), so no need for the protocol to send it to
the FP.

Bug: skia:10619
Change-Id: Icd1744d8573ded2a6fdf3c1901f46df0c91aab14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310760
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-15 20:04:47 +00:00
Jim Van Verth
939cc7a630 Some fixes for Flutter memory issues.
Now that we're using GrBuffers for uploads, we need to match the size
of the upload buffer a little better to avoid wasting memory, so this
switches to a using either a power-of-two size, or the midpoint between
two powers-of-two.

Also, the mechanism of adding the staging buffers to the current
command buffer was not being invoked when calling submit for a cross-
context texture. Switching to submitToGpu() should handle this.

Change-Id: I8e0e5ae7e4dd00b5969d5e5554e3a2bff5758e81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310339
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-08-14 23:04:46 +00:00
Jim Van Verth
e0da379fb7 Check for work completion before purging resources.
Change-Id: I17653e036ceb5f505284ae64cf6918b3bd2e02ce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310762
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-14 21:26:26 +00:00
John Stiles
4e54367db3 Fix SkSL constant propagation within nested casts.
Previously, the inner type was ignored.

Change-Id: I51d251fc38358ef889b5a3f85d5f2d23bd8cf4c5
Bug: skia:10615
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310657
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-14 21:18:56 +00:00
Herb Derby
43f49b4d52 static routines for direct map vertices
Split out the non-color-no-clip case for future specialization. This
routine will handle the vast majority of the glyph drawing. Split out
the generalized case too.

This change alone has a 20% improvement for performance due to fewer
register spills.

Change-Id: I89650c29ca273ac6e30266c2419029a7f177b029
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310516
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-14 20:11:15 +00:00
Herb Derby
e2ba971324 signal no clipping required
The original code had the fill vertex method handling the clip, but
each glyph was clipped individually. Signal no clipping at all is need
when the sub run is entirely enclosed in the clip rect.

Change-Id: Ifc7174fe7af967c9ab7240b2c7e2c0b062d7e259
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310556
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-08-14 19:02:55 +00:00
Greg Daniel
9a18b08981 Add support for vulkan non coherent advanced blends.
There are basically 3 parts to this change.
1) Implement GrVkGpu::xferBarrier virtual
2) Plumbing the need of an xferBarrier from ProgramInfo when getting a
render pass.
3) Tracking the need for an xferBarrier on GrOpsTask via
GrProcessorSet::Analysis

Bug: skia:10409
Change-Id: I6ab8f36719b3a4db576535eb6ed1c579ae34b7a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310439
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-14 18:50:35 +00:00
Mike Klein
13ec544d3f Reland "move conditions for JIT into SkVM.h"
This is a reland of 166cd52cee
with iOS simulator builds disabled.

Original change's description:
> move conditions for JIT into SkVM.h
>
> This makes it easier to keep in sync with the implementation in
> SkVM.cpp, and it's easier to handle here once than in each build system.
>
> Change-Id: I429f90cfc16f35a0d7e0b0fde176bc013aa7db18
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310263
> Commit-Queue: Mike Klein <mtklein@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

Change-Id: I82837c3d959769f26197f2402d3b911e71a35675
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310465
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-14 18:05:45 +00:00
Greg Daniel
ed629c191d Support making a VkRenderPasses with self dependencies.
The self dependencies allow us to use xfer barriers for advanced blends.
If we don't have the advanced blend extension the self dependency render
passes will also have an input attachment on them which can be used to
read the dst value in the shader.

Also has some renaming of previously plumbed values to better match what
we are doing.

Bug: skia:10409
Change-Id: I3b343064627921b8dc3debeeb6869b0f4b2dcc42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310337
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-08-14 17:35:29 +00:00
Mike Klein
8b07b9f55a Revert "move conditions for JIT into SkVM.h"
This reverts commit 166cd52cee.

Reason for revert: iOS simulator was on unintentionally

Original change's description:
> move conditions for JIT into SkVM.h
> 
> This makes it easier to keep in sync with the implementation in
> SkVM.cpp, and it's easier to handle here once than in each build system.
> 
> Change-Id: I429f90cfc16f35a0d7e0b0fde176bc013aa7db18
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310263
> Commit-Queue: Mike Klein <mtklein@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Auto-Submit: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

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

Change-Id: I1ae283be09906603c207079cbf6f1e296a4835f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310462
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-14 17:24:08 +00:00
John Stiles
03add801fe Improve unit tests for switch-case and enum error handling.
These tests verify that switches and enums only work with constant
integral values. Floats or uniforms should be rejected with an easy-to-
understand error message.

Change-Id: Ib634cb1ca1734a4b66ba53a3476e9ee539a63e3e
Bug: oss-fuzz:24889, skia:10615
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310396
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-14 17:10:15 +00:00
Nathaniel Nifong
00bb722628 missed minification bug
Check SKP file version, return error string to JS caller

Change-Id: I063920259e3ead102a4c7173d7015ff98992bbf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310338
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2020-08-14 17:06:05 +00:00
Mike Klein
01d0161863 byte code instructions can fit in a byte
This isn't particularly important.  It just struck me that if we're
going to be byte-thrifty, might as well go all the way.

Change-Id: I4d137731ac06643c50e6bc66cc4654abad732cea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310325
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-14 16:46:15 +00:00
Mike Klein
5778078440 clean up stray #undef
There was a time when we used to #define VECTOR(...) to make
it easy to add opcodes, but not since

    https://skia-review.googlesource.com/c/skia/+/299682

Oddly we never #undef'd VECTOR_MATRIX.

Change-Id: I4a68d29a0ee6c34ee421e1bc4e76155d110de6fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310324
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-14 16:42:35 +00:00
Greg Daniel
1247867d86 Remove ability to add waitOp to GrOpsTask.
This isn't used anywhere since we no have GrWaitRenderTask.

Change-Id: I31e5f89fabf547346886edba5db1fac819096146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310377
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-08-14 16:37:25 +00:00
Jim Van Verth
a496e3ff07 Fix MetalWindowContext::swapBuffers.
It looks like we were expecting the drawable to be retained outside
of swapBuffers(), which isn't always the case. Move the release
to the end of the method to retain locally until we're done with it.

Bug: skia:10597
Change-Id: Ieff6a3add0554b5b221700aff88fefd7c8502f41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309724
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-08-14 16:22:48 +00:00
Brian Osman
3e3db6c9a6 Make switch case handling safer
It's possible to construct a case value expression that's a compile time
constant, but fails to produce a value from getConstantInt. MSAN noticed
us using the uninitialized integer. It's now initialized, but also never
used in the failure case: We make getConstantInt return status, and give
better error messages in the two places it's used.

Bug: oss-fuzz:24889
Change-Id: I88e4e5b7bd1caeea1cf53f9b1d6f345dd8a5326f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310296
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2020-08-14 16:18:30 +00:00
John Stiles
fe0de30a87 Enable ClangTidy check modernize-use-nullptr.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html

The check converts the usage of null pointer constants (eg. NULL, 0) to
use the new C++11 nullptr keyword.

Change-Id: Iaea2d843154c70e49d62affdc5dceb3bca8c1089
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310297
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-14 16:14:30 +00:00
Adlai Holler
356bcb644c Remove SK_IMAGE_MAKE_COLOR_TYPE_AND_SPACE_USE_SOURCE_CONTEXT
This staging flag is no longer used by Chrome.

Bug: skia:104662
Change-Id: Ib788b3bb4a975e496d72729fa47fb52952ab6a12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310336
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-08-14 16:05:49 +00:00
Herb Derby
c27d535fc2 benchmark for text vertex fill
Change-Id: If293360e2473be6d316cbfeccf8ec3ebeba2df1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309779
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-14 16:03:57 +00:00
Brian Osman
020dc5aa90 Move init code from pipeline stage generator to GrSkSLFP
Having the logic to emit, parse, and re-emit this boilerplate spread
across the generator and FP was unnecessary. Having it emitted directly
is simpler, and will allow some flexibility when we change the signature
of runtime effect SkSL.

Change-Id: I7ebd5e62bfe1e41035c4fb9efadb427be915b9f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310158
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-14 15:47:09 +00:00
Mike Klein
166cd52cee move conditions for JIT into SkVM.h
This makes it easier to keep in sync with the implementation in
SkVM.cpp, and it's easier to handle here once than in each build system.

Change-Id: I429f90cfc16f35a0d7e0b0fde176bc013aa7db18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310263
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-08-14 15:16:37 +00:00
Nathaniel Nifong
17fd901d93 Check SKP file version, return error string to JS caller
bug:skia:10579

Change-Id: I1419febc4846e33bce293e14a4666337d7965305
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310108
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-08-14 15:14:47 +00:00
Robert Phillips
2bfee21d94 Require a direct context to precompile a DDL's programs
Change-Id: I0c16c1cb2181a22ec0339d993a031d0fef0fc276
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310068
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-14 14:35:41 +00:00
John Stiles
dfded1b0a2 Describe the Skia 'onMethodName' pattern.
This pattern is used frequently throughout the codebase but seems fairly
unique to Skia. It can be misleading if you haven't seen it before.
(In particular, the `onXxxxx` naming scheme is sometimes used to
indicate message-passing or event-handling, but that's not how it is
used in Skia.)

Change-Id: I73c5f7874bc51f8fde07baa8ef6a0e47c102302a
No-Try: true
Docs-Preview: https://skia.org/?cl=310159
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310159
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-14 14:21:28 +00:00
Florin Malita
c9c4e2e9ef Componentize SkAudioPlayer
Relocate under modules/audioplayer and package as a standalone
component.

Change-Id: If9dc72bb0abe170049a514c9931186703a3c138a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310058
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-14 13:46:06 +00:00
John Stiles
48bdf6ddb1 Use a scoped block for inlined return statements.
Inlined return statements emit two statements--an assignment, then a
break. If scope braces are otherwise missing, the break statement will
end up in the wrong place. i.e.:

Mistranslated:
	if (foo) return bar;  --> if (foo) out = bar; break;

Translated properly:
	if (foo) return bar;  --> if (foo) { out = bar; break; }

Change-Id: Id992abf64ad09e6752f64c71cb556f05c868a453
Bug: skia:10607
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310177
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-14 13:05:16 +00:00
Robert Phillips
70743df812 Update iOS Skottie App for GrContext changes
Change-Id: Iddfd7c483a5fc734284a4e28a64c3cd249e22e5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310116
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-14 12:55:56 +00:00
Robert Phillips
e219c7ed37 Require a direct context to precompile shaders in DM
Change-Id: I44051f0e00ac47c53631084e2221594ec30bddfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310067
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-14 12:54:46 +00:00
John Stiles
1cf2c8d6ec Enable ClangTidy flag modernize-use-override.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html

Adds override (introduced in C++11) to overridden virtual functions and
removes virtual from those functions as it is not required.

virtual on non base class implementations was used to help indicate to
the user that a function was virtual. C++ compilers did not use the
presence of this to signify an overridden function.

Change-Id: If66d8919358f72a4035190caf8d7569268037a9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310160
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-14 10:54:45 +00:00
skia-autoroll
c184cf3609 Roll Chromium from ffe842956061 to 00c099ff627a (445 revisions)
ffe8429560..00c099ff62

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 fmalita@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/+doc/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
Tbr: fmalita@google.com
Change-Id: Ib89597f151be8ba54e791a15311429fd8f167792
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310202
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-14 04:54:19 +00:00
skia-autoroll
33dfc2b4c2 Roll ANGLE from cc958e0e8703 to eb85c0213d43 (10 revisions)
cc958e0e87..eb85c0213d

2020-08-14 jmadill@chromium.org Vulkan: Refactor Context CommandBuffer query.
2020-08-13 jmadill@chromium.org Vulkan: Track used Images in RenderPass.
2020-08-13 m.maiya@samsung.com Vulkan: Query application name from the system
2020-08-13 timvp@google.com Vulkan: Correctly determine mip level in resolveColorWithCommand()
2020-08-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from b2be8f165978 to fb86cfb19849 (4 revisions)
2020-08-13 nguyenmh@google.com Add tests' expectations to capture replay tests
2020-08-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from b60e067b4374 to d253278f9865 (1 revision)
2020-08-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 13a65b1aee42 to df859f77dab3 (7 revisions)
2020-08-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from e930c45863c6 to 6b0de7007af5 (4 revisions)
2020-08-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 13f04d59c727 to cda86eff6461 (4 revisions)

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 fmalita@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/+doc/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: fmalita@google.com
Test: Test: FramebufferTest_ES31::MultisampleResolveIntoMipMapWithBlit()
Change-Id: I08794bd946f0706ffb8a55fcf44c18ee589feebf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310203
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-14 04:50:14 +00:00
skia-autoroll
ebfb99bb19 Roll dawn from 4a486be696b4 to d315022be5b7 (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/4a486be696b4..d315022be5b7

2020-08-13 idanr@google.com Add Metal vertex pulling behind a flag
2020-08-13 idanr@google.com Enable robust buffer access pass if robustness on
2020-08-13 enrico.galli@intel.com Eagerly destroy CommandBuffer commands after submission
2020-08-13 enga@chromium.org Roll 5 dependencies
2020-08-13 cwallez@chromium.org Remove wgpu::Buffer::SetSubData
2020-08-13 cwallez@chromium.org Remove deprecated array layer descriptor members
2020-08-13 jiawei.shao@intel.com Clean up BufferZeroInitTests

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from b60e067b4374 to d253278f9865
  https://chromium.googlesource.com/external/github.com/google/shaderc from c626b912dc45 to ffd805115ed6

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC cwallez@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: cwallez@google.com
Change-Id: I6e0fbffb0986a8ec74eafeb74eeb7ce101ddf7f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310201
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-14 04:49:14 +00:00
skia-autoroll
b6ce6baf7a Roll SwiftShader from cda86eff6461 to abe07b943855 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/cda86eff6461..abe07b943855

2020-08-13 swiftshader.regress@gmail.com Regres: Update test lists @ cda86eff

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

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: fmalita@google.com
Change-Id: I932c22f85d43690d79955dbda6bb53128fa50272
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310200
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-14 04:41:44 +00:00
Ben Wagner
283c230fa1 Improve ASSERT_RETURN in SkScan_Path
When this assert happens in a Chromium bug report it just states
"assert(false)". While the line number is present the line numbers
aren't always stable or easy to track down over time, so having the
condition that actually asserted present gives better certainty about
where in the code and which condition failed to hold in relation to the
crash report.

Change-Id: I7b0deb05c1736ba90c7642c90d8be44d2d17e9f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310156
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-08-13 22:56:53 +00:00
John Stiles
4914cbc495 State lambda return types explicitly when multiple returns exist.
This is easier to read than casting nullptr to the desired type.

Change-Id: I19eb85f96dc4e66316e36c1839b8df25f39fa608
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310178
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-13 22:51:13 +00:00
John Stiles
311dd9d847 Return the T* pointer back to the caller in SymbolTable::add.
This makes the add() interface more closely aligned with
takeOwnershipOfXxxxx().

Change-Id: Iafd116fa86bd8ccfe07b730ebcd74d5304967878
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310069
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-13 21:56:53 +00:00
Brian Salomon
182ce66906 Make asserts in EllipticalRRectOp::Make agree with calling code.
The calling code guards against < .5 radii if not stroke-only.

Change-Id: Ic6075e2bef3989a02f1f87085dba9cecdd93d825
Bug: chromium:1114968
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310057
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-08-13 21:02:33 +00:00
Stephen White
5b27846491 Dawn: rewrite of uniform uploads.
Use Queue::WriteBuffer() for uniform uploads instead of the staging
manager. Utilize the fUniformsDirty mechanism in GrUniformDataMangaer
to cache and reuse the most recent BindGroup uploaded.

Doing this required moving bind group creation and setting to
GrDawnProgramDataManager::uploadUniformBuffers(), and passing the
RenderPassEncoder down to setUniformData(). setTextures() was
similarly modified (for symmetry).

Change-Id: I841a0cf710b10d5025ea895d3a109f05d2966639
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309663
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
2020-08-13 19:43:02 +00:00
Robert Phillips
3b356c5696 Update more example code to GrDirectContext/GrRecordingContext pair
Change-Id: Ic12b8292a09be097e99d2dc912d6d5188e645fbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307299
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-13 19:30:12 +00:00
Mike Klein
9e77f20864 more careful SkColorSpace hash collision detection
The new unit test SkASSERT()s a hash collision at head
(but passes in release builds) and does not SkASSERT()
with this patch to SkColorSpace.cpp.

Bug: chromium:1113865
Change-Id: Ibc05af4145a92bbd15c7d5e06ece9d269bd7a242
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310110
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-13 19:25:32 +00:00