Commit Graph

50233 Commits

Author SHA1 Message Date
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
John Stiles
8c91c93dce Refuse to inline SkSL with returns inside breakable constructs.
We do not have a good mechanism to break out of a nested for/while loop
or switch statement. Our inlining approach generates incorrect code in
those cases, and there's no apparent fix, since we don't have a
mechanism for subverting control flow like 'goto'. When we detect this
case, disable inlining for that function.

Change-Id: Ic4180b367a3895806b0cc36872155185138826e1
Bug: skia:10606
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310063
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-13 19:10:02 +00:00
Adlai Holler
963241f332 Prohibit gpu to raster in SkSpecialImage
Suspect this pathway isn't used, and we dont want to support it
in a future refactor requiring a GrDirectContext in getROPixels.

Bug: skia:104662
Change-Id: I9492fa7a6b85306d187c2eeab2463f305bd17dd0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309720
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-13 18:27:42 +00:00
Stephen White
61a55b010f Dawn: remove access to deprecated fields in BufferCopyView.
Change-Id: I258565e7652365993671281f4cc196e613483806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310062
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
2020-08-13 18:26:32 +00:00
Robert Phillips
dc3697036e Handle invalid DDLRecorder case
Prior to this CL, if we failed to create the DDL Recorder's target
proxy while creating the target surface we could create an invalid
DDL.

The specific repro case involved too big of an target proxy but
many other scenarios could result in the same behavior.

Bug: 1105903
Change-Id: I519a072600c168aa590fbe920f4029d08fe29e6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309777
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-13 18:20:12 +00:00
Brian Osman
1d4b92d878 Properly clean up va_list in SkSL::OutputStream
Change-Id: I8856ab94c0f99edbdf75df36edf88d1cb196fc8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310061
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-13 17:27:12 +00:00
Florin Malita
cc01311cfc [skottie] Add audio track support to viewer
Based on SkAudioPlayer, Mac-only for now.

Change-Id: Ic4b0e2814aa341586634cbd270d7afd90e32716b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310056
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-08-13 17:04:12 +00:00
John Stiles
36374400b5 Add missing static qualifier to enforce internal linkage.
Change-Id: I1b387146aee612d9ffcb5aa15536f08a04cadf67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310060
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-13 16:54:32 +00:00
John Stiles
49a5a189d4 Add missing IR headers to the .gn file.
Change-Id: I7ba287b5d8e34571b5ca3e502413b2aafa27acc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310059
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-08-13 16:54:12 +00:00
Ben Wagner
a530e0802f Better abort in SkBitmap::allocPixels
Since the Skia SK_ABORT logging has been improved, it is noted that the
majority of release asserts are originating in SkBitmap::allocPixels. In
many of these cases there appears to be plenty of free memory reported
at the time of the assert. Log a bit more information in the assert
message to get an idea about why this is happening.

In a future CL it may be worth structuring this so that the out of
memory condition is distinguished from other possible failure modes so
that it can be marked as an out of memory condition in crash reporting.
It may be possible that the system still has memory available but it
unwilling to allocate it.

Change-Id: Ib2ed92e869000a3713556e17675c53245629a233
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309884
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-08-13 15:58:11 +00:00
John Stiles
af36652766 Move non-gencode onDumpInfo methods to private section.
`onXxxxx` methods in Skia are generally intended to be non-public.

Change-Id: I26b6bdcee653f41a22c91f79d01b20a274210747
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309981
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-13 15:34:21 +00:00
Leon Scroggins III
326b98981e Add platform image encoder for using NDK APIs
Bug: skia:10369

Add SkEncodeImageWithNDK, mirroring the CG and WIC versions, for
encoding with the NDK APIs added to R.

Rename SK_ENABLE_NDK_DECODING to SK_ENABLE_NDK_IMAGES and use it for
both encoding and decoding.

Move code for converting to/from NDK types into a common location.

Update encode_platform.cpp to use NDK encoding APIs when available and
to use both types of webp (lossy and lossless). Add tests specifically
for the new implementation.

Update NdkDecodeTest to use ToolUtils::equal_pixels for comparing
pixels.

Change-Id: Ic62f89af27372ccce90b8e028e01c388a135a68c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/308800
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-13 15:21:41 +00:00
Mike Reed
8a8be22597 audio player (for mac)
Change-Id: I491df748d22dfa566000c265a61f62f81755e5a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309792
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-08-13 15:09:32 +00:00
Mike Klein
984d49667a deserialize SkCanvas::SrcRectConstraint safely
Bug: oss-fuzz:24764
Change-Id: I86b935850158780d5f65be025ffd16f704984806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309695
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-08-13 14:56:41 +00:00
Leon Scroggins III
53ff19c852 Remove unnecessary pointer increment
These variables are about to go out of scope anyway, and will be
re-declared with the proper value on the next iteration of the loop.

Change-Id: I2d3cfa1c888057b98125c83854f6af817225d0b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309958
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-08-13 14:55:01 +00:00
John Stiles
776c2841f8 Move onDumpInfo calls in gencode to the private section.
`onXxxxx` methods in Skia generally appear to be non-public, which I did
not realize until after originally implementing this task.

Followup CLs will update the non-gencode `onDumpInfo` methods to be
private as well.

Change-Id: I807eee132b080f72f6b040e1ca7f687be25dff11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309883
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-13 14:48:51 +00:00
John Stiles
8dd1e22f41 Update GrOp subclasses to use onDumpInfo for info dumping.
This is meant to parallel the changes in http://review.skia.org/309793,
but for GrOps. The base-class info is automatically appended without
subclasses manually calling `append(INHERITED::dumpInfo())`.

Change-Id: Ic815305feeeca07385687af5703f0dd88a008f9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309879
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-13 13:06:59 +00:00
John Stiles
1e0136ecdb Remove more dump-info utility methods when GR_TEST_UTILS is off.
`GrRenderTask::dump` is now enabled by GR_TEST_UTILS, not SK_DEBUG.
`GrOpsTask::dump` is now enabled by GR_TEST_UTILS, not SK_DEBUG.
`GrOp::dumpInfo` no longer exists when GR_TEST_UTILS is off.

Various GrRenderTask subclasses' `name` methods are now enabled by
GR_TEST_UTILS, not SK_DEBUG. (`name` is only referenced by `dump`.)

Note that GR_TEST_UTILS can be enabled with SK_DEBUG turned off, which
makes a lot of these ripple-effect changes unavoidable.

Change-Id: Ie0fafed6f05c7d4083e769cd2f058db9ecc01d5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309882
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-08-13 13:05:09 +00:00
John Stiles
df9ed89229 Fix logic error in GrProcessorSet::dumpProcessors.
I broke this during the refactor, at http://review.skia.org/304857

Change-Id: I9f16acd05fbb3767eed59810a1b1a8a110ce29d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309878
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-08-13 12:52:19 +00:00
skia-autoroll
fec8e60ea3 Roll ANGLE from d667ad2f0127 to cc958e0e8703 (4 revisions)
d667ad2f01..cc958e0e87

2020-08-12 jmadill@chromium.org Remove D3D9 configs from perf tests.
2020-08-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 8e1380996d6a to 13a65b1aee42 (4 revisions)
2020-08-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from fcfe5a3b19d5 to e930c45863c6 (7 revisions)
2020-08-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 59b4828f293e to 13f04d59c727 (3 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
Change-Id: Id076e22ef39f75172d95efd99f7e0907b15e648d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309867
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-13 05:05:48 +00:00
skia-autoroll
83b9b3d0ef Roll Chromium from 7a75987d261a to ffe842956061 (455 revisions)
7a75987d26..ffe8429560

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: Id4f51ad9044d492c96bbab789fa96012a0ffd0b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309864
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-13 04:50:48 +00:00
skia-autoroll
246c528e39 Roll SwiftShader from 13f04d59c727 to cda86eff6461 (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/13f04d59c727..cda86eff6461

2020-08-13 capn@google.com Implement shaderStorageImageMultisample support
2020-08-12 sugoi@google.com Fix copying cubemap textures out of bounds
2020-08-12 swiftshader.regress@gmail.com Regres: Update test lists @ 13f04d59
2020-08-12 sugoi@google.com Fix decorations bleeding to following block members

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: I333a334baf3d01ae6ba8034ba486b715250c6f4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309865
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-13 04:38:19 +00:00
skia-autoroll
025843fad0 Roll dawn from 37f547456cc6 to 4a486be696b4 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/37f547456cc6..4a486be696b4

2020-08-12 enga@chromium.org Roll third_party/tint/ bc80805c4..5e7ef27ca (9 commits)
2020-08-12 cwallez@chromium.org Update tests to use new mapping APIs
2020-08-12 cwallez@chromium.org Small nits for the implementation of WriteTexture in D3D12

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: I18ec2bf6a913c91550c78af6ece54658f852faf9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309866
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-08-13 04:34:09 +00:00
Brian Salomon
652124c372 sk_gpu_test::MakeTextureProxyFromData -> MakeTextureProxyViewFromData
Change-Id: Ie55a147566ef68a64e3b03d8cab701e54dbf1f0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309780
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-08-12 20:43:41 +00:00
John Stiles
cab588677b Add GrProcessor::onDumpInfo for subclass info dumps.
This CL also marks `GrProcessor::dumpInfo` as final. This prevents a
subclass from mistakenly overriding `dumpInfo` instead of `onDumpInfo`.

`onDumpInfo` is responsible for providing the same data as `dumpInfo`,
except that the FP name is automatically prepended.

Change-Id: I2b44c30a01bc65e9d88321cc21651a94e20074c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309793
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-12 20:20:51 +00:00
John Stiles
8d9bf6467b Reland "Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG."
and
"Guard gencode dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG"
and
"Remove dumpInfo() entirely when GR_TEST_UTILS is off."

This is a reland of 26900788ef
and b5e8a2533a
and d7b09c4c3a
and unit tests are now fixed.

Original change's description:
> Guard dumpInfo() calls with GR_TEST_UTILS, instead of SK_DEBUG.
>
> (One exception: the `dumpInfo` in GrVkCommandPool is wrapped with
> SK_TRACE_MANAGED_RESOURCES to match its peers in GrVkManagedResource.)
>
> Change-Id: I6cf55fa2bb5687f79a2cc0c2a9c02a629bfd4f8e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309556
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Change-Id: I16e6606082a814b4fa5ef58d1096fc915f5ac704
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309721
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-08-12 19:46:41 +00:00
Brian Osman
e12939f0d8 Unit tests for runtime effect SkSL errors found later in compilation
Forgot to add these when I fixed the bug. Verified that these tests
failed without the fix.

Bug: skia:10593
Change-Id: Ia20fad3cd8e5b0f63ca19946b8314eed49bec2bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/309716
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-08-12 19:40:21 +00:00