Before, in the new clip_shader_nested GM, without the
checkForDeferredSaves() call, the first clipShader() would end up
associated with the original save record, but the intervening scale()
call checked for deferred saves. This meant the second clipShader() was
associated with the new save record and would be removed during the
restore (although the first shader remained).
Change-Id: I62f33b821de810c68f62069201ae3429f520be8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293690
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Enable shaper and paragraph tests to run on Android builds.
Change-Id: Ib1685653ac4432a04998aed56dc76b9020253e75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293244
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
GL_APPLE_sync is ES only. GL_ARB_sync is not ES.
Change-Id: If595c01ec9a878a4d73862fa4ba79a76f1173d77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293574
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: Ifb47c6be05bffad4a42030f4375dcbe0fe313ae0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293656
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:10314
Change-Id: I073c8be1d0bd4d3f2f678d8963bd05ec396cd163
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293564
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Updated GM to draw a row of cases using CTM transform. For positions,
the resulting points are in absolute coordinates, so use a special
shader that takes that into account during the visualization.
Change-Id: I6985f7f451175a8d0d5116974edcaa5372560bfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290437
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Only pass -Wno-microsoft-cast for clang.
Change-Id: I10b610784bbbcfb397f5249f5050f1d1b0a0b69c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293345
Reviewed-by: Weston Tracey <westont@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
I was hoping this might fix the issues I'm seeing in the dependent CL.
It doesn't, but it's probably worth rolling every few months anyway.
Change-Id: I6d748d9e1a5bf908df78e989a624f2dccb1bd189
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293604
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This makes it easier to work with SkSL files when using an IDE.
Change-Id: I30665478a9cde63b4c9ba7e5a9948e9647f7ef81
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293571
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
In 99.99% of the cases the call to updateTextureCoordinates is only
called once per SubRun. If the regenerator was used for multiple
SubRuns, this might be interesting.
Change-Id: I95e9e526ed27dd800298711478694efef0121b66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293563
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: Ib03b7c1c72e394edf1b84b5c71492ef8c8882ea0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293580
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Guruji Panda <guruji@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Once this API is retracted, we can rename it to something more sane.
The code base has some `fContextInfo` ivars of this type, suggesting it
was previously named ContextInfo. It could be a ContextGroup or something else.
Bug: skia:10318
Change-Id: I3471e2172f46163f98a94780f0d7eb3431894cda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293556
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Change-Id: I9dbe6020d67cc452c9cbbdeace68f1d01275b419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293559
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>
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>