Fix: const auto [...] --> auto [...]
This reverts commit 0066adefa9.
Change-Id: I5d2df8bcc2bc681259a55b2b851d53fb18599287
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288550
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
The main value of current AnimationBuilder::attachAssetRef is to provide
scoping semantics for ref cycle detection.
Refactor using a RAII helper (ScopedAssetRef), and avoid std::function
callbacks.
Change-Id: Idf5327465b8a06313cd9ea89be5f229ddc0aef7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288617
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
...since it's used for both image and video Lottie layers.
TBR=
Change-Id: I52e85d70d4adbda61dfa3b33acdf4eb17ddbf332
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288616
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
BUG: chromium:1075540
Change-Id: Ice300ec25f148b9ccf3db07b66f37859f4711a1f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288547
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The dawn backend was calling GrDawnGpu::flush() in a few places (in
particular, for readpixels).Since GrGpu::submitToGpu() is now
responsible for unmapping the staging buffers prior to command
submission, internally calling GrDawnGpu::flush() is error-prone,
since it requires you to unmapStagingBuffers() manually.
The fix is to get rid of GrDawnGpu::flush(), and put its guts into
GrDawnGpu::onSubmitToGpu(). Then we call submitToGpu(true) where we
used to call flush().
Also, make the backend responsible for moving staging buffers from the
active to the busy list. We do it just before calling mapAsync(),
since the callback may return right away and we want the buffer to be
in the busy state at that point.
Change-Id: I99cfa5e7ea3a454b0383a30483fa93795191347a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288516
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This reverts commit 61642b3366.
Reason for revert: ../../src/utils/SkCustomTypeface.cpp(179,20): error: cannot decompose this type; 'std::tuple_size<const SkPoint>::value' is not a valid integral constant expression
Original change's description:
> Revert "Revert "custom typeface""
>
> Fix: implement onComputeBounds() and generateFontMetrics()
>
> This reverts commit 0066adefa9.
>
> Change-Id: Idb59336a3d201bb97e494ee0e0bb189e0a7186f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288536
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
TBR=bungeman@google.com,reed@google.com
# Not skipping CQ checks because this is a reland.
Change-Id: I6845bb96a00a0c9ee54704a4c299556cc32e6438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288557
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I9508790d67bf62b5a064ff5222a74e9566354351
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287888
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 3a79f33eca.
Reason for revert: MSAN issues
Uninitialized value was stored to memory at
#0 0x2cd74de in SkFontPriv::GetFontBounds(SkFont const&) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkFont.cpp:400:34
#1 0x31115ad in SkTextBlobBuilder::ConservativeRunBounds(SkTextBlob::RunRecord const&) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:307:31
#2 0x31104d2 in SkTextBlobBuilder::updateDeferredBounds() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:374:47
#3 0x31104d2 in SkTextBlobBuilder::make() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:605:11
#4 0x31175c1 in SkTextBlob::MakeFromText(void const*, unsigned long, SkFont const&, SkTextEncoding) /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/src/core/SkTextBlob.cpp:782:20
#5 0x1920415 in UserFontGM::onOnceBeforeDraw() /mnt/pd0/s/w/ir/cache/work/skia/out/Build-Debian10-Clang-x86_64-Release-MSAN/Release/../../../../../../skia/gm/userfont.cpp:65:17
Original change's description:
> custom typeface
>
> - only paths implemented at the moment
>
> Seems if we want to serialize/deserialize these, we will need to
> register a factory with skia, so it can sniff the beginning of the
> font "file", to know how to recreate it.
>
> Lots of follow-on things to explore:
> - do we need to even store/know advance widths?
> - should we also (optionally) support a CMAP? names? others?
>
> Change-Id: If9fa99b7b8f6e265f06eb3ba2ca4fcb073275250
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287157
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com
Change-Id: Iee93db8d0f94d706f0b97566d2d15e2ad2407601
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288463
Reviewed-by: Mike Reed <reed@google.com>
- only paths implemented at the moment
Seems if we want to serialize/deserialize these, we will need to
register a factory with skia, so it can sniff the beginning of the
font "file", to know how to recreate it.
Lots of follow-on things to explore:
- do we need to even store/know advance widths?
- should we also (optionally) support a CMAP? names? others?
Change-Id: If9fa99b7b8f6e265f06eb3ba2ca4fcb073275250
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287157
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Bug: chromium:1077355
Change-Id: Ie7a8310c07f6ba473e7937aa4c3cb435d488ef17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288459
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This fixes several issues introduced with DirectWrite and onMakeClone.
The primary issue is that the font file loader and collection loader
need to remain registered until the last font using them is no longer
in use. Prior to onMakeClone this was just the original font, so
unregistration was simple. However, when cloning a new font is brought
into existence using the same loaders as the original. All clones need
to keep a reference to the loaders so that the last can unregister them.
In addition variable fonts complicated the concept of equality of fonts.
As a result when variable font support was introduced an Equal method
was provided to make comparison easier. Use it when available to avoid
issues when comparing two system fonts which differ only by their
variation design position.
Change-Id: I6aa8d8cc3240f1244d16f661f6fbfd17ff0f7412
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288159
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
daed369cfd..101da75736
git log daed369cfdb6..101da7573691 --date=short --first-parent --format='%ad %ae %s'
2020-05-07 cnorthrop@google.com Capture/Replay: Update gfxbench traces
2020-05-06 cnorthrop@google.com Sync state when calling getTexImage
2020-05-06 patrto@microsoft.com Specify LUID in D3D11
2020-05-06 geofflang@google.com GL: Ignore warnings about requested extensions not being present.
2020-05-06 timvp@google.com No-Op draws when no active VS and/or FS is present
2020-05-06 spang@chromium.org Add spang to OWNERS for Fuchsia port
2020-05-06 geofflang@google.com Make sure all target names are unique in the generate Android.bp
2020-05-06 geofflang@google.com Vulkan: Initialize all members of VmaVulkanFunctions.
2020-05-06 tobine@google.com Vulkan: Move CommandBufferHelper to vk_helpers.h
2020-05-06 jmadill@chromium.org Revert "Capture/Replay: Update traces to include Reset"
2020-05-06 cnorthrop@google.com Capture/Replay: Update traces to include Reset
2020-05-06 courtneygo@google.com Revert "No-Op draws when no active VS and/or FS is present"
2020-05-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 2e1d208ed9de..d2b486219495 (1 commits)
2020-05-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src 102687e26ec8..28b8813b3998 (7 commits)
2020-05-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader c4bbd378e95b..baa10d7b1dee (3 commits)
2020-05-06 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src 1bf08b392b8e..aaba2f0ac575 (1 commits)
Created with:
gclient setdep -r third_party/externals/angle2@101da7573691
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 bsalomon@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-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: bsalomon@google.com
Change-Id: Ic563812f31232dd77b516d1618917d370c5ae573
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288348
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This reverts commit 9c4fa1e9cd.
Reason for revert: breaking things, maybe?
Original change's description:
> Fix tile modes in SkGpuBlurUtils.
>
> Expand direct GM testing of SkGpuBlurUtils.
>
> Decimate in SkGpuBlurUtils using GrSurfaceContext::rescale.
> GrSurfaceContext::rescale() works on recording context and
> uses approximate textures (to avoid memory issues for blurs
> of many different sizes).
>
> Don't preserve contents to the top/left of the source bounds
> in the rescaled image.
>
> GrGaussianConvolutionFragmentProcessor applies wrap mode to
> both axes.
>
> Rely on GrTextureEffect to omit subset enforcement in shader
> by providing a domain rect rather than turning off tiling in
> caller.
>
> Change-Id: I73e09b4fcbcbed590dd3599091c38d5de65f48c4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285099
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,michaelludwig@google.com
Change-Id: Ifdbfd9bdc67a082bf99e62371a7037e9544cf12a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288269
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
`zu` is the expected specifier for a size_t. `li` can cause errors in
the Android build.
Change-Id: Ie418c9e8778a629acf47ae58a2720fd11a732c87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287896
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Add support for external precomp Skottie layers. This allows embedders
to seamlessly mix custom/Lottie content.
General flow:
* embedders register a PrecompInterceptor callback with
the animation builder
* at build time, Skottie invokes the callback for each pre-composed
layer
- the returned ExternalLayer implementation is used instead of the
Lottie layer payload
- (a nullptr value signals Skottie to use the usual Lottie payload)
* at render time, ExternalLayer::render() is called to defer content
rendering to the embedder
Also implement a sample PrecompInterceptor which attempts to substitute
precmp layers matching a given pattern with external Lottie animations:
precomp_name: "__foo.json" -> Animation("foo.json")
This new mechanism is a generalization of (and supersedes) the old
NestedAnimation hack - so we can remove that.
Change-Id: Id80fe11881c62b8717c2476117c7c03ad5300eef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288130
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
This change does not any public APIs but just pulls apart the create and
update steps inside of createBackendTexture. A future CL will allow just
calling update from the public API with an already create texture.
This change only splits apart the work for non compressed textures.
Compressed support can be added at a future time, but for many backends
it should be fairly trivial since the update call handles compressed and
uncompressed already.
Change-Id: Iae99e9f140c347effe66b5d669c6f39bce023115
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287856
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Catalina requires that we call [NSOpenGLContext clearCurrentContext]
when tearing down contexts. We were doing it in the GLWindowContext
destructor, but not when switching for MSAA.
Bug: skia:10134
Change-Id: I81be962419ca4afa724ab3f896081af4bbedda3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288157
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Selecting an MSAA option that the context does not support can cause
issues, so prevent those options from being displayed.
This fix was suggested by jvanverth@ during his review of
https://skia-review.googlesource.com/c/skia/+/287976
Bug: skia:10134
Change-Id: If8c35786da83e6ace336328281d7005cc75cf301
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288096
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Chrome hopes to use this as a heuristic for when to yield. I.e., if no work is done, keep going but yield after each compile that did work.
Change-Id: I9524ca03078af3cd60f0042b2e8b0ec4c628e5f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288176
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I754fde671fcbaa2acf6443eb0a737b546e5c6f7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287889
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Expand direct GM testing of SkGpuBlurUtils.
Decimate in SkGpuBlurUtils using GrSurfaceContext::rescale.
GrSurfaceContext::rescale() works on recording context and
uses approximate textures (to avoid memory issues for blurs
of many different sizes).
Don't preserve contents to the top/left of the source bounds
in the rescaled image.
GrGaussianConvolutionFragmentProcessor applies wrap mode to
both axes.
Rely on GrTextureEffect to omit subset enforcement in shader
by providing a domain rect rather than turning off tiling in
caller.
Change-Id: I73e09b4fcbcbed590dd3599091c38d5de65f48c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285099
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
We won't lose much by not going to color attachment layout since when the
renderable GrBackendTexture gets wrapped in an SkSurface we still will put
in a barrier to protect from write after write. The barrier will now just
also include a layout change.
Change-Id: I91cddd0a4de415760c3e7e4382c243946f788301
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288136
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: Icd317eb1b260e9640473e8a201a204a6e49bc002
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287916
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
The callback lets the caller know when the data uploads to the texture
from the create call are finished. This is important since the caller
cannot delete the backend texture till the gpu is finished on vulkan
and d3d.
This change also removes the hard sync in vulkan during creation.
Change-Id: I660d142219474e22b1337d2b0c81cda66fe18a4b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/286517
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: Id8394acf854f1c069c5fde449ede225b2d81968b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288056
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>