Nearly all instructions have one form, with a count byte after the
instruction. Simplifes the SkVM conversion logic, reduces code size.
Change-Id: I5ff7bb2991a09198c5c8f5bcaf2c1017c06be5d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299682
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:10416
Change-Id: I2f1b87521174d18afc59f12832441010cb94ea3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299294
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: I22a6b110c414fe3d8942b2c890c1339de45c39e6
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298984
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This reverts commit ca5b36c474.
Reason for revert: This may be blocking the Chrome roll
Original change's description:
> Add storage on the surface for its last render task
>
> Let's land this and see if it gets us back to baseline on the
> lastRenderTask regression from the bug. If it doesn't, we'll revert it
> since the extra complexity won't have been worth it.
>
> Bug: skia:10372
> Change-Id: I9d5ae93435b833d575afdc7f219dc8e7c453c92b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297836
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Adlai Holler <adlai@google.com>
TBR=robertphillips@google.com,adlai@google.com
Change-Id: Id418d042d1123d946cd99b7b1ba438211cb628ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10372
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299763
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This is a reland of 318afe66e6
Original change's description:
> Don't flatten images in SkImageShader
>
> Bug: skia:9570
>
> Change-Id: Idd4485b5c5814501fe98fbf2115d89a80a41f5c7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299139
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:9570
Change-Id: I4761e354dd4ec4f4a60097e06c3b9b9b73e538f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299681
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: Idf0c2fa4a0affb8c661d5610167bd8990781920b
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298982
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>
I will follow this up with a Chrome-side CL to fix the call sites of the following factories:
MakeFromCompressedTexture
MakeFromTexture
MakeFromYUVATexturesCopyWithExternalBackend
MakeFromYUVTexturesCopyWithExternalBackend
MakeFromNV12TexturesCopyWithExternalBackend
Here is the Chrome-side CL: https://chromium-review.googlesource.com/c/chromium/src/+/2264598/ (Skia's SkImage::Make* factories now guarantee cleanup)
Here is the Chrome-side CL that adds the guard flag:
https://chromium-review.googlesource.com/c/chromium/src/+/2273067/ (Add flag in order to roll a Skia CL into Chrome)
TBR=bsalomon@google.com
Bug: 1097484
Change-Id: Ic2fcdc116f0f866b33d752b6d5abc784c7f65be6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299663
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Ib9a61ffba5495c67652662a0d15fafc8f1f6ff1f
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299577
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Previously, GrColorSpaceXformEffect had separate Make methods; one took
a child FP, the other did not, and they had slightly different color-
transform inputs (the destination alpha type was assumed to be premul
when a child FP was provided). A null FP was considered invalid.
This has been updated to work more like other FPs. An childFP must
always be supplied, and nullptr is interpreted as "use the sk_InColor".
The destination alpha type is now always supplied. Existing call sites
were fixed up as needed.
Previously, the child-FP path would actually render the product of the
child FP and the sk_InColor. This extra multiplication step no longer
occurs; the sk_InColor is simply ignored when a child FP is used. In
practice, this did not affect any existing GM tests.
Change-Id: Id53449234948255cbdaab9b88b1c94201eeb0a0d
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299576
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
At this point, every created instance of GrCoordTransform is an identity
so can be removed. Adding it manually using addCoordTransforms() is no
different than relying on the (current) implicitly returned coord
transform if the FP calls setUsesSampleCoordsDirectly().
Removing the addCoordTransform() lets us enforce that this remains the
case and this CL also deletes all of those members that were previously
used to provide access to the sample coordinates.
As part of this, GrFragmentProcessor.h and many other files no longer
need to include GrCoordTransform.h. This exposed a surprising popularity on
SkMatrixPriv.h so I updated those files to include that header directly.
Technically, a .fp file can still have an @coordTransform section and
the sksl generator will try and call addCoordTransform, which will then
fail to build. A follow up CL removes that support in .fp generation.
Bug: skia:10416
Change-Id: I5e4d2bb49ee6d7e56ac75ca00be5631106fec20b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299291
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This will not be landed until chrome CL 2269958 lands.
Bug: skia:10425
Change-Id: I2a5081201ca3faed5232e8540086bd4c6f865767
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299292
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 318afe66e6.
Reason for revert: breaking Android roller due to failed CTS tests when drawing content from different colorspaces
Original change's description:
> Don't flatten images in SkImageShader
>
> Bug: skia:9570
>
> Change-Id: Idd4485b5c5814501fe98fbf2115d89a80a41f5c7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299139
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,michaelludwig@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:9570
Change-Id: I25af1062fb75a8353dd7b7dbb174eb06fa5b24fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299676
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Let's land this and see if it gets us back to baseline on the
lastRenderTask regression from the bug. If it doesn't, we'll revert it
since the extra complexity won't have been worth it.
Bug: skia:10372
Change-Id: I9d5ae93435b833d575afdc7f219dc8e7c453c92b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
The GpuDevice only guarantees a recording context so start removing the assumption that we have a GrContext.
Change-Id: I9fd3dba64799a3b0b5857aa1946c497f1984df23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299557
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
If the backend doesn't support mipmaps, skip the test cases which
only differ by the mips flag.
Bug: skia:10361
Change-Id: I05e3bc59c2d9d1af6b5cb3659a7a346f2cdc8b82
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299558
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
An effort to hide nuts and bolts from developers who wish to use
SkottieLib in their own application.
Change-Id: I2020e73279a53de8852d5b04d90d0e28bdbb5c6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298978
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
- print -> print()
- xrange() gone in 3, but range() works similarly - if somewhat
less efficient in 2
- read() returns strings in python 2 vs. bytes in 3
Change-Id: Ia720551832ef75edbf9235b80a06e2ffa3ddf4b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299444
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This CL fills out the GrVkGpu::compile method and updates GrVkCaps::makeDesc to both reconstruct the GrVkRenderPass AttachmentsDescriptor and AttachmentFlags from the GrProgramDesc.
In the 'compile' case, the renderPass info is used to get a renderpass and then a pipeline state.
In the 'makeDesc' case, the renderPass info is used to create the ProgramDesc.
Bug: skia:9455
Change-Id: I3810651232c95c3d837d96655853ea54056c70cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/288462
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
c81da1c809..69c011ef35
2020-06-26 syoussefi@chromium.org Assert no undefined behavior with left shift in angle::Bit
2020-06-26 m.maiya@samsung.com Vulkan: External image layout needs to be ReadWrite
2020-06-26 ianelliott@google.com Vulkan: Fix fbo_invalidate tests for pre-rotation
2020-06-26 nguyenmh@google.com Reformat Framebuffer::readPixels
2020-06-26 ianelliott@google.com Vulkan: Fix copySubImageImplWithDraw() for pre-rotation
2020-06-26 ShabbyX@gmail.com Vulkan: Fix mipmap generation and level redefinition
2020-06-26 syoussefi@chromium.org Vulkan: Remove emulated clears before mipmap generation
2020-06-26 cwallez@chromium.org Skip MultithreadingTest.MultiCreateContext on Ozone
2020-06-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 23498d296498 to 2e189d3854db (1 revision)
2020-06-26 cwallez@chromium.org Suppress dEQP GLES3 attribute aliasing on Vulkan
2020-06-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 7a1af5878594 to efaae24d0006 (2 revisions)
2020-06-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from 0f4d5f74f199 to ff825d988fe8 (1 revision)
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 ethannicholas@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:1094599,chromium:1094644
Tbr: ethannicholas@google.com
Test: Test: angle_deqp_gles2_tests --gtest_filter=dEQP.GLES2/functional_texture_specification_basic_copy*teximage2d_*Test: Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_\*Test: Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_texture_specification_basic_copy*teximage2d_*
Change-Id: I2ecd737320938a496cce0a5acdc139c070002243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299510
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
This belongs on a SkTypeface which might have a back pointer to a font
collection in which it can do lookup. It makes little sense to pass a
random typeface into a potentially incompatible SkFontMgr. Some of the
existing implementations will crash if this happens.
This initial commit is 'conservative' in that it removes the public API,
the backing onMatchFaceStyle is left intact to avoid breaking
implementors (as opposed to users). It may also be used as an
implementation detail in a future SkTypeface API when the typeface holds
a reference on its collection.
It appears there are no users of this API and it is also untested.
Change-Id: I6e06f918ad73a500c254746b3957c3579fab3b9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299198
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Ensure that it always exists and that implementers don't forget about it
and wind up with an incorrect default.
Change-Id: I383cb1eb8e15de49fbbb007d719837804aca33af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299456
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Skia has moved to CTFontManagerCreateFontDescriptorFromData for creating
CTFonts directly. This means the awkward support for buggy CTFonts
created from CGFonts can be removed from the variation logic. Since
variations are already not supported on 10.11 and earlier this should
have no noticeable effect.
Change-Id: I9f8b0d70e1000c9a4f7b8c00670b80364432cee0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299441
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: skia: 10349
Change-Id: Id5fdd24749e836806a91b6c40c2abb18f2889e44
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298414
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This is a temporary fix to handle an issue where we try to map a
dynamic buffer when it's in use in a previous command list.
Change-Id: Ibc6b071508c11ea394a320b326645ecc4b22105a
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299392
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Although not necessary this, at least, demonstrates how we expect these callbacks to be used.
Change-Id: I67c81e5cf882fbf2511729ede29f6ae9af389d52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297862
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
We'll need this if we're ever to get rid of GrContext.
It is pulled out of:
https://skia-review.googlesource.com/c/skia/+/296704 (Downgrade GpuGMs to only receiving a GrRecordingContext)
Bug: skia:10441
Change-Id: I964b5caf3e947afbfc7d441a8e17ad298961d8f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299295
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Trade a divide for two multiplies.
This is almost always a good deal,
though Skylake's getting close.
Change-Id: Ic776145200957bb686edd00fbe0446212b436014
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299372
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:10416
Change-Id: I5a8cc6367b9041688eaac711d33c645ebf24d73c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299289
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
python 2.7 subprocess.check_output:
"Run command with arguments and return its output as a byte string."
python 3 ubprocess.check_output:
"By default, this function will return the data as encoded bytes."
Using a 'b' prefix seems to cover both cases.
Change-Id: Ie2d90bc93d0e98a723a262fae63fe538137812c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299382
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:10416
Change-Id: I1cd7bb978f0c62632547d85f4c323b230c6f4045
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299287
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit 1caf3789f8.
Makes the image GMs detect an abandoned context just like the surface
GMs.
Bug: skia:10431
Change-Id: I56a3631a75e6b0383f96a73f461cfa314ee29afa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299379
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Also support the "N" variant of several instructions (for doing
component-wise math on matrices). With these changes, all cases
in sksl_sample_chaining work on the CPU backend, too.
Change-Id: Ie439153da452c80127e314e48fa0fa751d9f8d33
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299378
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 7ac9b5fdb6.
Reason for revert: abandon context bots breaking
Original change's description:
> Add async rescale and read APIs to SkImage.
>
> These function the same as the already existing
> SkSurface APIs.
>
> Bug: skia:10431
>
> Change-Id: I4f1e842d8d4b72ee27bae5f8a85e499e130d420c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299281
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I351795274245fc9f553cd210d82178f497f22660
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10431
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:10396
Change-Id: I32dd41f4d1a6815cace46d74442f727da848fbfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299285
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:9570
Change-Id: Idd4485b5c5814501fe98fbf2115d89a80a41f5c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299139
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Add PerfActivity to Skottie demo app, which can render
with both Lottie and Skottie players. Create bash script, which
runs 15 lottie files with both renderers, runs perfetto and
outputs performance metrics in json files.
Test: ran run_perf.sh and it outputs perf metrics on WearOS and Android
Change-Id: I6bdd86629284ac5c461cf2f5ee537e0495a72bd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298980
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
These test the *ooprddl configs
Change-Id: I1eaee1ceaef95ab37ddbefa4a15350cb726a2c02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296728
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Added sksl_sample_chaining, which draws identically to
fp_sample_chaining, but uses runtime effects that implement each
strategy.
Change-Id: Ib54fbe4fc6d98b4a8e91cf0e3ae6b7e19283ad37
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299076
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
The particle "cube" demo was exceeding the old limit now that the SkSL
compiler is inlining by default.
Change-Id: I9db921cb1f4304d32d4725be38dcbf7d07abcfa9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297740
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>