Commit Graph

48632 Commits

Author SHA1 Message Date
Brian Salomon
674a5ccd3c Add threshold for partitioning blur draws
Change-Id: I67d9fd869871cdcf3c56b2b8e1048095f44c19b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293337
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-06-02 15:49:18 +00:00
Leon Scroggins III
1adcac52d6 Remove transform_scanline from SkWebpEncoder
Bug: skia:10178

These functions can be performed generically using SkRasterPipeline
or skcms. Further, the reason we used a function pointer anyway was
so that we could call the same function on each row separately. But
libwebp's API doesn't let us do a single row at a time anyway.
Simplify this method by using readPixels when necessary and
skipping conversion entirely when possible.

Add support for encoding from unpremul 4444. It is simpler to support
it, and it's not obvious why we didn't support it before.

Keep the behavior of not supporting A8, and apply the same to the
other alpha-only formats. Note that we could support encoding such an
image to alpha, r=0, g=0, b=0, but I'd rather leave adding that
feature to a separate change, which enables it for all encoders (and
accounts for the internal use of PNGs as a round-trip for
kAlpha_8_SkColorType).

Add GMs to test the newly supported SkColorTypes.

Change-Id: I4d86c5621792fb6dc3cb68b736a1eb35d577e3a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292962
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-02 15:37:29 +00:00
Herb Derby
b2a19f0fb3 Make path data private
Change-Id: Ie98cc179cf327cb0608d41354bcf44e0c61ac6f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293561
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-06-02 15:31:58 +00:00
Corentin Wallez
bcbef3a17b Rolling 2 dependencies
Roll third_party/externals/shaderc/ 7d2f8c57e..d8eca133b (4 commits)

7d2f8c57ee..d8eca133b4

$ git log 7d2f8c57e..d8eca133b --date=short --no-merges --format='%ad %ae %s'
2020-06-01 rharrison Rolling 5 dependencies (#1078)
2020-06-01 bryan.bernhart Support forcing storage buffers to be always declared as UAV. (#1076)
2020-06-01 rharrison Roll third_party/spirv-cross/ 61cddd630..d385bf096 (4 commits) (#1077)
2020-05-26 rharrison Rolling 4 dependencies and expectations (#1074)

Roll third_party/externals/spirv-cross/ 7e0295abf..d385bf096 (18 commits)

7e0295abf8..d385bf096f

$ git log 7e0295abf..d385bf096 --date=short --no-merges --format='%ad %ae %s'
2020-05-28 bryan.bernhart Prefer set/binding API
2020-05-28 post Document all CLI options.
2020-05-28 post Do not mask writes to remapped variables in all cases.
2020-05-27 bryan.bernhart HLSL: Add option to treat certain SSBO bindings as UAV, even with readonly.
2020-05-25 post Handle physical pointers in reflection API.
2020-05-22 post GLSL: Improve support for GL_ARB_shader_draw_parameters in desktop GLSL.
2020-05-21 dsinclair Roll SPIRV-Tools, SPIRV-Headers and GLSLang.
2020-05-20 dsinclair Roll dependencies
2020-05-20 post GLSL: Add more test shaders for hit attribute types.
2020-05-20 post GLSL: Support ray payloads and hit attributes declared as Block.
2020-05-20 post GLSL: Add some more focused RT test shaders.
2020-05-19 post HLSL: Implement image queries for UAV images.
2020-05-08 post Support gl_InstanceID in RT shaders.
2020-05-06 post MSL: Avoid packed arrays in more cases.
2020-05-06 post Add missing reference files from PR merge.
2020-05-06 lehoangq Fix #1359: MSL: If the packed type is scalar, don't emit "pack_" prefix.
2020-04-30 post MSL: Redirect member indices when buffer has been sorted by Offset.
2020-04-30 cwallez Fix -Wmicrosoft-enum-value

Created with:
  roll-dep third_party/externals/shaderc third_party/externals/spirv-cross

Change-Id: I16638dc8707b987b8e73bf99f3d9976c7ac5fb60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293516
Reviewed-by: Zhenyao Mo <zmo@google.com>
Commit-Queue: Zhenyao Mo <zmo@google.com>
2020-06-02 15:06:38 +00:00
Jim Van Verth
06d2e96095 Bind D3D constants.
Final step to get shader constants working. Changes the root
signature to store the constant buffer view directly inside it, and
sets it via the command list.

Change-Id: Ib82a5cc60dd54347f2c5b6885f3ef553e005e760
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293348
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-06-02 15:06:18 +00:00
Brian Osman
6b3d6e9210 Rewrite SkVertices serialization to use SkReadBuffer/SkWriteBuffer
These classes are much safer (there's no way to safely deserialize a
string with SkReader32 without knowledge of how it works internally).
Prior to this CL, SkVertices was the only complex type that had manual
serialization using the lower level types - now it works like everything
else. Additionally: the versioning can now be tied to picture versions
going forward (like everything else).

Bug: oss-fuzz:22909
Bug: oss-fuzz:22918
Bug: skia:9984
Bug: skia:10304
Change-Id: I3cf537eb765b5c8ce98b554c0f200e5d67c33d14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293349
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-02 14:45:18 +00:00
skia-autoroll
0bfae282f4 Roll ANGLE from 48102b2b3655 to 77e5316a515d (11 revisions)
48102b2b36..77e5316a51

2020-06-02 jiajie.hu@intel.com Pull in Android-only dependencies behind a condition
2020-06-01 cclao@google.com Vulkan: acquire swapchain image should use COLOR_ATTACHMENT_OUTPUT_BIT
2020-06-01 amaiorano@google.com Enable CopyTextureVariationsTest.CopyTexture on VK
2020-06-01 jmadill@chromium.org Vulkan: Move "null" buffer to RendererVk.
2020-06-01 lehoangq@gmail.com Metal: Fix array of structs containing array of samplers bug.
2020-06-01 msisov@igalia.com move duplicated SwapControlData to rendergl_utils.
2020-06-01 jmadill@chromium.org Update dirty bits flow example.
2020-06-01 plamoureux@google.com Move ShaderVariable utility function from utilities.cpp ShaderVars.cpp.
2020-06-01 m.maiya@samsung.com Vulkan: Enhance VulkanBarriersPerfBenchmark
2020-06-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 8dfdbeff84f3 to f050cca7ec47 (1 revision)
2020-06-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 3c5bad0911e3 to 500f77901f6d (9 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 tdenniston@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:1084458,chromium:1086532
Tbr: tdenniston@google.com
Test: Test: angle_perftest --gtest_filter=VulkanBarriersPerfBenchmark.Run/vulkan_buffer_copy
Change-Id: I57492c8412d8578e27c6d8e672e30ecbc5ff6c55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293474
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-02 14:20:16 +00:00
Herb Derby
a5ced79473 Move addOp to SubRun and rename
Change-Id: I2f1a10d2e19e3a57b1c58e2a4fb0171d15c62b7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293346
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-02 13:48:00 +00:00
Mike Klein
bec7f1056c trim down skia_select()
First, remove Bazel support.  We don't test that.

Then, be less strict about the number of args to skia_select(),
simply constructing a dictionary for each condition provided.

This lets us provide more results than BUILD provides conditions,
making it easier to stage new condition/result pairs.

We can use this to provide Fuchsia results here (after wasm), and then
flip it all on by adding the appropriate Fuchsia condition to BUILD.

Change-Id: I309b976470bb5bf13cfb6e59658196820037a142
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293473
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-02 13:47:20 +00:00
Mike Klein
89c909efee Wsign-conversion for public headers
This is an Android request for our public headers,
much like warning about unused parameters.  See bug.

In general I've made two kinds of source changes:

   1) more commonly, explicitly cast to the type which
      is being implicitly cast to at head;

   2) less commonly, flip signedness of a value we're
      storing to match how it's used more smoothly.

Much of this is self inflicted inconsistent use of size_t, unsigned,
int, int32_t, uint32_t, etc.  SkTArray is particularly tricky because
of its std::vector half-compatibility.  E.g. resize() takes size_t,
but operator[] takes int.    ¯\_(ツ)_/¯

Bug: skia:9847
Change-Id: I64626a529e1662b3d3020bc03d477fc641eda544
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293436
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-02 12:34:54 +00:00
Joe Gregorio
e8121e57ab Revert "Request specific ANGLE context versions."
This reverts commit 8eeff5ccf3.

Reason for revert: Breaking the Win10 ANGLE bots. https://status.skia.org/repo/skia?commit_label=author&filter=search&search_value=ANGLE

Original change's description:
> Request specific ANGLE context versions.
> 
> Using the ANGLE_create_context_backwards_compatible extension, request
> explicit ANGLE context versions to make sure test coverage of context
> versions matches Chrome.
> 
> BUG=skia:10309
> 
> Change-Id: Ifa4a36851a0517b369d094e5707348a20eaf3879
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293339
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Auto-Submit: Geoff Lang <geofflang@google.com>

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

Change-Id: I5be9651bdc5d72fd02049f3280f11fc32213c231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10309
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293536
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2020-06-02 12:27:06 +00:00
skia-recreate-skps
3a5de9aae1 Update Go Deps
Change-Id: Idfe506058a25c9fe3bc3fd28172257627c6a0246
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293460
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-06-02 05:29:10 +00:00
skia-autoroll
6e5288a5ef Roll Chromium from c70c5e32ad0b to 0fa619691087 (402 revisions)
c70c5e32ad..0fa6196910

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 tdenniston@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: tdenniston@google.com
Change-Id: Ie633fb4b1f9ab8bc8f2a39fbb1bfbe5cf1fa570b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293452
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-02 04:42:00 +00:00
skia-autoroll
c2fafa1a31 Roll SwiftShader from 471c120ac92a to 11dd7183c4d2 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/471c120ac92a..11dd7183c4d2

2020-06-01 capn@google.com Remove generation of OpenCLDebugInfo100.h
2020-06-01 capn@google.com Fix deallocation of uninitialized pointer

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 tdenniston@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: tdenniston@google.com
Change-Id: I0ed1ec6cb2a3e5335199b25376c31964cba0846a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293454
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-02 04:40:10 +00:00
Geoff Lang
8eeff5ccf3 Request specific ANGLE context versions.
Using the ANGLE_create_context_backwards_compatible extension, request
explicit ANGLE context versions to make sure test coverage of context
versions matches Chrome.

BUG=skia:10309

Change-Id: Ifa4a36851a0517b369d094e5707348a20eaf3879
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293339
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Geoff Lang <geofflang@google.com>
2020-06-01 22:42:40 +00:00
Leon Scroggins III
995b467563 SkIcoCodec: Read the entire stream into data
Bug: 932080
Bug: b/142252770

An ICO file has a directory of images that are stored later in the file.
The directory contains the offset and size of the images. SkIcoCodec
uses these to create embedded SkPng/SkBmpCodecs. The old implementation
allocated a block of memory for each image and copied the stream into
those blocks so that the embedded SkCodecs could independently read
their encoded data.

Although SkIcoCodec checks for null, this still allows large (albeit
temporary - since we'll discard them if the stream does not contain
enough data to fill them) allocations and the potential for over-
commit.

Instead, read the entire stream into a contiguous buffer. If the stream
is already actually a buffer, just use that directly. In this case, the
new code will do less work. Otherwise, the memory we allocate is
limited by the size of the stream.

Note that this is a behavior change for a stream that contains two
consecutive ICOs, where the client expects to be able to read the second
one later. This was an issue for PNGs on Android (b/34073812), but I
suspect no one is relying on this behavior for ICO. Update Codec_end
test to remove the ICO test.

Alternatives to consider:
- only buffer the individual encoded images. This will allow us to
continue passing the Codec_end test.
- lazily read the embedded streams. Currently we read their start to
verify they are valid images (at least in the header) and read their
actual sizes and bit-depths, which could differ from that listed in
the directory. We use those to make a guess at the "best" image to use.
An image with mismatched sizes may now decode differently.

Change-Id: I30e5f6c8c2e5a0fa135348f61efe151a7f5d4756
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/277058
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-06-01 21:14:09 +00:00
Jim Van Verth
f5776b7f19 Fix RTAdjust for Direct3D.
D3D's NDC space is y-flipped compared to Vulkan and Metal.

Change-Id: I9ab55efd431f2db877cea8e55d78eec737655a38
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293341
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-06-01 21:08:09 +00:00
Leon Scroggins III
43182bccce Remove SkBitmapRegionDecoder and SkBRDAllocator
Bug: skia:10154

Once ag/11371053 lands, Android will only be referencing the new version
at android::skia::BitmapRegionDecoder. Remove the old code that remained
for the transition.

Change-Id: Ic532d705e8f2861f56dcaa0ac1c68dd2b0712035
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291357
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-06-01 20:56:29 +00:00
Jim Van Verth
3eadce263c Create ring buffer for managing D3D uniforms.
* Adds a base class for the ring buffer (to be used by Metal as well),
  which tracks the current available space. APIs will need to
  implement creation of the buffer in the subclass.
* The API implementation will need to store SubmitData on command buffer
  submit, and then pass it to finishSubmit when the command buffer
  finishes.

Change-Id: I4cc5e4a72d259ee9d15dac0e964819d4562da3d7
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291936
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-06-01 20:38:40 +00:00
Chris Dalton
7ca48cc1b2 Map the 's' key in CanvasKit viewer to force animation
We force animation in order to measure fps.

HINT: Launch chrome with --disable-frame-rate-limit and
--disable-gpu-vsync in order to measure frame rates above 60.
Change-Id: I08fae8fc2eb65930f81110999a64eed9df9c704f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292994
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-01 20:38:39 +00:00
Mike Reed
e37d578796 Revert "gms for SkParagraph"
This reverts commit 7351f8c560.

Reason for revert: breaking...
   flutter android docker
   win shared

Original change's description:
> gms for SkParagraph
> 
> Change-Id: If84de6242a1048ff9f29264ac6afe060ce3856eb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291696
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Julia Lavrova <jlavrova@google.com>

TBR=djsollen@google.com,bungeman@google.com,scroggo@google.com,fmalita@google.com,reed@google.com,jlavrova@google.com

Change-Id: I97df26b3406b0814de378393391e66ef65d84429
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293347
Reviewed-by: Mike Reed <reed@google.com>
2020-06-01 20:14:44 +00:00
Herb Derby
62c579c1f5 Move makeOp to SubRun
Change-Id: Idb7fc569dabfb5626714e875eaaa97036d4f9a4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293343
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-06-01 20:06:37 +00:00
Florin Malita
28cdc972f6 [skottie] Pull SkottieProperty.h from Skotti.h
Forward declaration for PropertyObserver should work, but some G3
builds/configs are barfing...

TBR=

Change-Id: I47fc8d24d4e706df470c010c8fce13f07d726fd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293340
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-06-01 20:05:36 +00:00
Herb Derby
7a6221e86e Make flags private
Change-Id: I16139e8e6479b7088d5b426d4903fe71dd53d4af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293376
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-06-01 19:58:03 +00:00
Mike Reed
7351f8c560 gms for SkParagraph
Change-Id: If84de6242a1048ff9f29264ac6afe060ce3856eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291696
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2020-06-01 19:46:40 +00:00
John Stiles
7a8e394496 Revert "Allow printf-style formatting to be used in SK_ABORT."
This reverts commit 67e50a6b5c.

Reason for revert: roller complains about LICENSE issue. cl/314177415

Original change's description:
> Allow printf-style formatting to be used in SK_ABORT.
> 
> SK_ABORT was already using SkDebugf to print the error message to the
> console, so all the moving parts were there. This CL just adds a
> mechanism for the calling code to pass in arguments.
> 
> Added a use case to demonstrate usage--when an allocation fails, the
> requested size is now shown in the error message.
> 
> Change-Id: I42f141151fb57a399c086926249816833f349ddb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293272
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

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

Change-Id: I7a2e98bcda82bbe6edfa3d00057586754df0ee71
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293342
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-01 19:32:08 +00:00
John Stiles
67e50a6b5c Allow printf-style formatting to be used in SK_ABORT.
SK_ABORT was already using SkDebugf to print the error message to the
console, so all the moving parts were there. This CL just adds a
mechanism for the calling code to pass in arguments.

Added a use case to demonstrate usage--when an allocation fails, the
requested size is now shown in the error message.

Change-Id: I42f141151fb57a399c086926249816833f349ddb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293272
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-06-01 18:49:37 +00:00
Herb Derby
d9f2c5f58f Make fMaskFormat private
Change-Id: I7543a29e9b8a6b5e372f940d5662e66d9ac2169b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293249
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-06-01 18:41:33 +00:00
Nathaniel Nifong
3392ebe974 Additional tests covering parts of path interface
Change-Id: I28fa842a56c3ff6464b6f4175baee1e6f1d99994
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292970
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-01 18:37:03 +00:00
Lingyun Cai
502eab4fc9 Add AVX2 implementations for SkSwizzler opts
nanobench performance improvements are observed using i9-9900k.

                        before      after       improvement
RGBA_to_BGRA            121  ns     66.3 ns     45%
RGBA_to_bgrA            290  ns     154  ns     47%
RGBA_to_rgbA            290  ns     157  ns     46%
RGB_to_BGR1*            138  ns     137  ns     -
RGB_to_RGB1*            137  ns     137  ns     -
grayA_to_rgbA           162  ns     96   ns     41%
grayA_to_RGBA           91   ns     68.1 ns     25%
gray_to_RGB1            106  ns     87.1 ns     18%
inverted_CMYK_to_BGR1   272  ns     146  ns     46%
inverted_CMYK_to_RGB1   273  ns     147  ns     46%

*Note. For RGB_to_BGR1 and RGB_to_RGB1, nanobench perf regressions
are observed on some platforms using skvx + AVX2 intrinsics. So keep
the original SSSE3 implementations here.

Change-Id: I2f7a5980dda82455932bddf168dfe836c46b1341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290436
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-01 18:03:50 +00:00
Adlai Holler
33dbd65611 Pass file and line number when asserting single owner
Working on debugging some multithreading and when a bot fails single owner, currently we get the unhelpful message "GrSingleOwner.h:33" with no backtrace. With this at least we get the real function.

Bug: skia:10305
Change-Id: I201ae96839bf9c043d009abc44a6ba784a9b9742
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293246
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-01 17:10:40 +00:00
John Stiles
8c5786622b Reland "Remove double support from SkSL."
This reverts commit 59aa4b7187.

Reason for revert: ASAN failures were actually unrelated to this CL.

Original change's description:
> Revert "Remove double support from SkSL."
> 
> This reverts commit 71a35d49b7.
> 
> Reason for revert: ASAN failures on swarming bots
> 
> Original change's description:
> > Remove double support from SkSL.
> > 
> > Doubles are not supported by Metal or GLSL pre-4.0, are not supported in
> > most backends, and aren't used in any GMs. There isn't any good way to
> > use them in new code as it would just degrade to float on many of our
> > supported platforms. (This is assuming that our backends actually know
> > how to degrade doubles to floats, which is not universally the case.)
> > 
> > Change-Id: Ieacc69db4bdacca104a15a6eef33e05f977d1ffa
> > Bug: skia:10299
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292846
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> 
> TBR=bsalomon@google.com,ethannicholas@google.com,johnstiles@google.com
> 
> Change-Id: I175e42420bcae8dfacd0bfeb269dd84e0b3c9d25
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10299
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293268
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com,johnstiles@google.com

# Not skipping CQ checks because this is a reland.

Bug: skia:10299
Change-Id: I5cdd71a1512228175514a0d29e19ae91afc78b6a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293273
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-06-01 16:10:29 +00:00
John Stiles
cbe4e2822c Fix strict-constraint bleed in strict_constraint_[batch_]no_red_allowed.
GrTextureOp was attempting to detect subset-rectangles that wouldn't
affect the rendering output and could be ignored. Unfortunately, this
optimization attempt had various flaws--small, one-pixel cracks on
the edge of the border when AA was off, and highly-visible red fuzz on
the edges of textures when MSAA was enabled. This CL limits the
optimization to cases where the source and destination quads are
axis-aligned rectangles, or cases where the inset is more than a half-
pixel deep.

This fix was made for both the single-image and batch drawing path, and
generalized as much as possible to allow the code to be shared.

This CL also cleans up the test code slightly.

Bug: skia:10263, skia:10277
Change-Id: I200aaab47737b5ba0f559182ef4d0dfe0b719d50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291197
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-06-01 15:51:09 +00:00
Kevin Lubick
6aa3869f76 [canvaskit] Use scratch arrays for colors and matrices
At startup, we allocate a few scratch arrays and then use those
instead of having to malloc and free a bunch of arrays during
runtime.

The benchmark that was added is a bit noisy (probably because
of the garbage collection going on from the created Float32Arrays),
but a few percent faster.

We also don't set the paragraph background/foreground colors to
transparent because we check them being falsey before sending them
over the wire. I noticed that if foreground was transparent black,
no text shows up at all, which was unexpected.

Change-Id: I9f3a590a122d7de222cb5f58ea40e86b2d261c96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292685
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-06-01 15:47:07 +00:00
Stephen White
f40cef851c Dawn: fix Device leak in DawnTestContext.
The C WGPUDevice returned by CreateDevice needs an Acquire call to
ensure it's correctly refcounted.

Bug: skia:10291

Change-Id: If5d917165b5846bea1472f24aa12db2db7f3a9e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292958
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-06-01 15:38:40 +00:00
John Stiles
59aa4b7187 Revert "Remove double support from SkSL."
This reverts commit 71a35d49b7.

Reason for revert: ASAN failures on swarming bots

Original change's description:
> Remove double support from SkSL.
> 
> Doubles are not supported by Metal or GLSL pre-4.0, are not supported in
> most backends, and aren't used in any GMs. There isn't any good way to
> use them in new code as it would just degrade to float on many of our
> supported platforms. (This is assuming that our backends actually know
> how to degrade doubles to floats, which is not universally the case.)
> 
> Change-Id: Ieacc69db4bdacca104a15a6eef33e05f977d1ffa
> Bug: skia:10299
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292846
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=bsalomon@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I175e42420bcae8dfacd0bfeb269dd84e0b3c9d25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10299
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293268
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-01 15:24:42 +00:00
Ethan Nicholas
7c969f26bc Revert "Omit dead SkSL functions"
This reverts commit 97fe0cbed2.

Reason for revert: ASAN failures

Original change's description:
> Omit dead SkSL functions
> 
> Now that SkSL inlines functions, dead functions are very common. This
> change causes them to be omitted from the final output.
> 
> Change-Id: Ie466a3f748812eff1a368498365c89d73ab0b7be
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292684
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: Id20c5be67dd574d30d6f978ba610e43aa5018416
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293241
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-06-01 15:00:00 +00:00
Adlai Holler
43b1579dac Make abandonment state of context thread-safe
The plan going forward is to centralize all thread-safe data in GrContextThreadSafeProxy, make it not derive from GrContext_Base, and have all the GrContext-derived classes share a pointer to a context group's shared GrContextThreadSafeProxy. And probably rename the proxy class after retracting it from public API (GrContextFamily?)

Bug: skia:10295
Change-Id: I9807ad0926f9b2d69a8694db974a3bcac9fd66b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292853
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-06-01 14:47:07 +00:00
Brian Osman
273944ac7c Convert GrMatrixEffect to pure CPP/H
Prelude to adding situational optimizations

Change-Id: Ie7994a87380ba6135398c9a1d4b26cea6bf32fa8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292972
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-01 14:33:57 +00:00
Ethan Nicholas
97fe0cbed2 Omit dead SkSL functions
Now that SkSL inlines functions, dead functions are very common. This
change causes them to be omitted from the final output.

Change-Id: Ie466a3f748812eff1a368498365c89d73ab0b7be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292684
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-06-01 14:27:38 +00:00
John Stiles
71a35d49b7 Remove double support from SkSL.
Doubles are not supported by Metal or GLSL pre-4.0, are not supported in
most backends, and aren't used in any GMs. There isn't any good way to
use them in new code as it would just degrade to float on many of our
supported platforms. (This is assuming that our backends actually know
how to degrade doubles to floats, which is not universally the case.)

Change-Id: Ieacc69db4bdacca104a15a6eef33e05f977d1ffa
Bug: skia:10299
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292846
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-06-01 14:08:17 +00:00
Bryce Thomas
9331ca0704 CanvasKit: implement client-supplied dirty rect support for software surface.
Surface clients can now specify a dirty rect that will constrain HTML canvas
repaints to a particular region.

Bug: NONE
Change-Id: Ia77d6e864c061297bfc82cfa09030523052ee0e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293056
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-01 12:05:08 +00:00
skia-recreate-skps
dc69222c84 Update Go Deps
Change-Id: I1122237c87d0725ec02083a87f34d88313082d4c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293220
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-06-01 05:42:10 +00:00
skia-autoroll
7e8f79a420 Roll Chromium from a775f5d273ab to c70c5e32ad0b (561 revisions)
a775f5d273..c70c5e32ad

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 tdenniston@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: tdenniston@google.com
Change-Id: I3ecd4a83bb5213b49f4d4c8c092c6f9de5750cd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293151
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-01 04:54:46 +00:00
skia-autoroll
481168b258 Roll ANGLE from 33004b09f180 to 48102b2b3655 (17 revisions)
33004b09f1..48102b2b36

2020-05-31 cnorthrop@google.com Perf: Add Candy Crush trace
2020-05-31 cnorthrop@google.com Perf: Add Subway Surfer trace
2020-05-31 cnorthrop@google.com Capture/Replay: Use aligned offsets for binary data
2020-05-29 jmadill@chromium.org Vulkan: Clean up VMA wrapper classes.
2020-05-29 jmadill@chromium.org Vulkan: Pass vk::Context to BufferHelper::init.
2020-05-29 lehoangq@gmail.com Metal: draw 1 triangle instead of 2 for fullscreen shaders.
2020-05-29 jmadill@chromium.org Set gl::Buffer to zero size when allocations fail.
2020-05-29 lehoangq@gmail.com Metal: Use bit fields for state descriptor caching.
2020-05-29 lehoangq@gmail.com Metal: Use 2d array for caching index conversion's pipeline state.
2020-05-29 amaiorano@google.com Fix CopyTextureTestES3.ES3FloatFormats for VK
2020-05-29 msisov@igalia.com Rename DisplayOzone to DisplayGbm.
2020-05-29 ianelliott@google.com Create a pre-rotation test for dFdx() & dFdy()
2020-05-29 cnorthrop@google.com Capture/Replay: Update MEC for Subway Surfer
2020-05-29 amaiorano@google.com Fix float to int copy in VK backend
2020-05-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9e718f962f87 to 471c120ac92a (1 revision)
2020-05-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from e00d27c6d65b to d39b8afc47a1 (2 revisions)
2020-05-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from afe55126be2d to 3c5bad0911e3 (2 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 tdenniston@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:1084458,chromium:1086532
Tbr: tdenniston@google.com
Test: Test: angle_perftest --gtest_filter="*candy*"Test: Test: angle_perftests --gtest_filter="*Trace*"
Change-Id: Ic0e25b70bb5b8eaeed1ee78e121aa742b72f0c84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293149
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-01 04:53:46 +00:00
Mike Reed
b42a327926 hide savelayer's clipmask fields
Bug: skia:9208
Change-Id: Ieff64b3132e7bf4a51ce9d70ea2f1bad492616da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223923
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-05-31 14:06:42 +00:00
skia-recreate-skps
94230f4b05 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I1baa355440de92d70bc6b0f960b049b2e787f058
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293142
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-31 08:52:42 +00:00
skia-recreate-skps
9c4c626521 Update Go Deps
Change-Id: I21e5d16ba67191b64656aadb3c249038c59d5943
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293137
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-31 05:35:47 +00:00
skia-recreate-skps
25a8404bd1 Update Go Deps
Change-Id: I1b54dd24aca1880fb31976473c4805adff49e90d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293083
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-05-30 05:33:46 +00:00
Brian Salomon
7a34aff3e6 Fix older chromeos tuple constructor deduction error
Change-Id: Ib53285264f59d792a60c2d67a0426f4a2fc42101
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293046
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-05-30 03:22:36 +00:00