By extension, this changes the default behavior of sample() in .fp
files. This lets us remove the explicit fInputColor/sk_InColor
arguments everywhere. Most sites that were using the default no
longer care what's passed, as the child is known to be a texture
effect that will ignore the input color. The few remaining sites
now explicitly pass half4(1) when necessary.
Change-Id: Ie4691b049f905d098e9befe8bd07706a496f2968
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303356
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Share code between GL and other backends.
Prepare for separate GrSamplerState field to control mip mapping.
Bug: skia:10344
Change-Id: I16adae3512e11971f98c63ae08fb8cde31332520
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302910
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Break the GrAtlasTextOp ctor into a mask version, and an SDFT version.
Reorganize geometry creation to allow more of the GrAtlasSubRun API
to be private.
Change-Id: Ic29d4026a15386d135e0fabc4f270810d1638b2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303262
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
If we have a DDL context, we can't make texture backed images and
we should skip this test. Notably, we intentionally do not want this
test to fall back to raster in this case.
Bug: skia:104662
Change-Id: I9c1fdf1608d177f905838cbbbd66f1a3ab61134a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303264
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Change-Id: I00a00e62dfb2021a2c380ef4217c1acec1f07672
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303258
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
We store an array of png-blobs for each level in the mip.
Change-Id: I745ee35cfec64b4b39c30650e3e5ab9b0a0ad5fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303023
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Most internal users of GrTextureEffect do not want this behavior. For
situations where we do (as part of paint conversion, actual image draws,
etc...) make that modulation explicit as part of the FP tree.
Bug: skia:10139
Change-Id: Ia975e1eb063c6852ad7fba9557d7ac7122eaf53b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303026
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Adds the command:
make skps_release_and_SIMD
for perfing builds against a set of SKPs in ~/skps for release and
simd builds of CanvasKit. Also outputs a summary of the perf results
in a table format.
See the document "SIMD CanvasKit Build Performance Testing"
for more details:
https://docs.google.com/document/d/114kdSGPMnOSQCZ7pFgd3MGMn5mIW562RMoXVmD13e0M/edit#
Bug: skia:10453
Change-Id: I311629a1420301dda41f7ec57ce1403b05fd949b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301982
Reviewed-by: Elliot Evans <elliotevans@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This splits 64-bit PixelFormats into two 32-bit parts and gathers both
independently. E.g.
F16 = {HALF, 16,16,16,16, 0,16,32,48}
~> lo = {HALF, 16,16, 0, 0, 0,16,32,32}
~> hi = {HALF, 0, 0,16,16, 32,32, 0,16}
The logic at the end merges the channels we gather from each part.
This all does strongly assume no channel straddles lo/hi, which we
assert. We'd need to get more clever to handle something like
20-20-20-4. I'm working on load() and store() now, and they'll need
this same format assumption.
Since I've so far only added support for gather(), I've introduced a
little temporary hack in SkImageShader to let it work just to demo this
all. This hack will go away when I add support for load and store.
Change-Id: Ic4cfda7922f2e51bb7698adedf6f655de43da630
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303320
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:10477
Change-Id: Ibf9bcb1d03a6003d00b124db8d826c7952842fef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300780
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This is part of a larger effort to force SkImage users to specify
the direct context they want to use when manipulating GPU images.
Chrome CL 2299194 (landed) enables the staging flag.
bug: skia:10466
Change-Id: I959db57dd8dca5c2622eb5ffaa7de161c4d6d8f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302643
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:10371
Change-Id: Iab54b8ae6764b41a010bd81c750d8285869ee58a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303020
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Adds new builder name schema for "Canary-*".
Bug: skia:10477
Change-Id: I0906c6e2df0af405ae3a2138b0fdeb99a9375853
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300700
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This is somewhat speculative; the newly supported F16 alpha and F16
red-green formats are not widely used or tested. This will become
better covered soon by F16 RGBA when I add support for 64-bit pixels.
Change-Id: Ie1260e2bb5e9c057064e3133937ff6910ab84269
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303297
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
* Check index in operator[]
* Use begin/end in const versions
* Remove returning SkSpan{} when empty for first, last, and subspan.
Change-Id: I0348ff8effb01e9175c5afaa52ddb0724f86218d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303259
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This CL tries to remove all uses of GrContext - replacing them with
either GrDirectContext or GrRecordingContext. Preferring the recording
context wherever possible.
Change-Id: I61af94928aa37bc82ff9923acffd57586610f695
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302904
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Tricky parts:
- remembering that we're carrying these 8 half floats around
in a ymm as an I32, not the more natural dense xmm;
- remembering to fix up the middle 64-bit lanes after vpackusdw
leaves things in an order you'd have to be Intel to love.
The tests from the previous CL cover this, and pass.
Change-Id: I5dfde54c1392388c82ee9c8274b83bc1d63b6577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303045
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 8f32f1300d.
Reason for revert: changes on chrome roll
Original change's description:
> Don't avoid disabling subset for planar image draws
>
> Change-Id: Icb34f14d1103a7849813d4b80e7733ba9b743a99
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302638
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,michaelludwig@google.com
Change-Id: I6f7aff58e3e5fd4c6ff6997bf3e13a0191bc2d28
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303257
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I166755b3e385fcea919a6daad8cc8407fda8c27a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303016
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
4ad0f250a0..6fe87f4a22
2020-07-15 cnorthrop@google.com Tests: Change screen orientation for traces on Android
2020-07-15 nguyenmh@google.com Add buffer serialization capability
2020-07-15 jonahr@google.com GL: Fix issue with EXTBlendFuncExtendedES3DrawTest
2020-07-15 jmadill@chromium.org Test Runner: Accept Chromium args.
2020-07-15 kbr@chromium.org Revise documentation on adding EGL extensions.
2020-07-15 cnorthrop@google.com Capture/Replay: More ES 3.1 support
2020-07-15 shrekshao@google.com Fix ANGLE_base_vertex_base_instance baseInstances type
2020-07-15 lehoangq@gmail.com Metal: Compile default shader source files separately.
2020-07-15 lehoangq@gmail.com Metal: Implement MSAA default framebuffer.
2020-07-15 jmadill@chromium.org Fix stale validation cache on buffer deletion.
2020-07-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from fe24a54808c2 to b481744aea1e (5 revisions)
2020-07-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 94667fbf66ee to 4c33fb0d3dba (12 revisions)
2020-07-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from cd0af6456eb1 to 1de497cc50ab (3 revisions)
2020-07-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 0bc4c2ae7012 to d8f34456c819 (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 nifong@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:1099763,chromium:1105202
Tbr: nifong@google.com
Test: Test: Capture from beginning of Asphalt 8 and Aztec Ruins
Change-Id: I42c068c939ac8612f1d68fd545a6b40a1bd55357
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303196
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Difference [1]:
The mask is added to the masks above it in the stacking order. In
areas where the mask does not overlap the masks above it, the mask
operates as it would alone on the layer. In areas where the mask
overlaps the masks above it, the influence of the mask is subtracted
from the masks above it.
^ sure sounds like XOR
[1] https://helpx.adobe.com/after-effects/using/alpha-channels-masks-mattes.html#mask_modes
Bug: skia:10502
TBR=
Change-Id: I8aea937224cfadce54c4fc1d014b63d00efdbec4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303025
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Makes add_quads iterative rather than recursive, and uses
a secondary buffer to handle vertex processing before
writing out to the vertex buffer.
Change-Id: I26606a34b7bfea2dc9c32d7b4ed4651d633e78a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303021
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
and related changes. This is another CL in the series that is replacing
GrContext with the GrDirectContext/GrRecordingContext pair.
Change-Id: Id0a3cfd5a5f92f7680d9c58f3a1753322311221c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302637
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Aligning with SkSamplingMode.
Bug: skia:10344
Change-Id: Ie303c3ca1d664d4c23f779b84c9a661076bd74d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303022
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Replaced with SkFontArguments::VariationPosition and
SkFontArguments::VariationPosition::Coordinate since the arguments are
about a variation specification and it's coordinates.
SkFontParameters::Axis actually deals with axes and their properties.
Change-Id: I377c9c5efa8e7b7e2649fc038f765062e30391e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302905
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
- add f32<->f16 functions to skvx
- add f32<->f16 x86 instructions to skvm::Assembler
- add f32<->f16 ops to skvm,
using the skvx functions in the interpreter
Still TODO:
use the new x86 instructions in the JIT
(For now like in many other ways, the aarch64 JIT
continues to languish. Will pick that back up one day.)
Change-Id: Ib8dc1ccdc75ecb23769ea4947d66d3ab22520f23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302942
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Although it appeared that the experimental_simd CanvasKit build was
working, the build was not producing actual wasm SIMD operations. This
CL fixes that issue by changing the build arguments.
This issue also fixes an incorrect type issue with the SkVx wasm SIMD
implementation.
Bug: skia:10453
Change-Id: If26f84b09e4d84df36be589245878c821972dffc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302669
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
The current serialization format for variations stores only the values
(without the axis names) and relies on the order of the axes for
deserialization. Even after this deficiency is corrected, it will still
be needed for legacy skps.
Add a real test which ensures variable font printing works correctly
in Chromium. The old test was essentially testing MakeFromFontData
against itself instead of creating a font with variations as a user
would.
Bug: chromium:1070089
Change-Id: Ia6eaac91b2ac58795b7ba61c2b52b2f22ef079bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299457
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This makes reset() a little easier to follow, and enables more complex
use cases on top of GrBlockAllocator down the road.
Change-Id: Id79d20e2b394248c997259d6d5b5494fc1456acc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302678
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
As I'm changing the subdivision method, I want to have a baseline to
make sure I don't break anything.
Change-Id: I655c658589c7229ae37d7b8588ff70325afeaa61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302907
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
AE appears to use the center of the shape bounding box.
TBR=
Change-Id: I965175dcc28cc9a8903b959a42b108d72767ef28
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302639
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
This allows the iterator type/boilerplate to be reused for any other
data collection that sits above GrBlockAllocator, as long as its a fixed
"type" with indices into a block.
Also adds reverse iteration (which is useful for stack-like use cases).
Change-Id: Id9a205e8fb396a8558e360439240fd20c92c9700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302665
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is just minor little stuff I've been meaning to do,
with essentially no impact anywhere.
- Add an easy-to-flip switch to disable the JIT.
- Stop checking so carefully whether we hasJIT()
in test_jit_and_interpreter(). This was helpful
for making progress but now just gets in the way.
Change-Id: I08065ba1f42700f9d7d63f8303af357ec5fe11ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302944
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Change-Id: I068f71d94d506213e6c9b24d7fe5c6d6187e5ac0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302902
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Add store(PixelFormat,...) to mirror earlier load/gather.
Use store() in SkVMBlitter to let us to write to any format
supported by SkColorType_to_PixelFormat().
This means we can read and write all the same formats now. There's a
note on the SkColorType enum about some SkColorTypes being read-only,
but I've taken that to be descriptive and not proscriptive.
It's worth paying attention to grayscale. Gray PixelFormats hold the
same bit size and shift for each of r,g,b so load/gather just naturally
unpack the same value into each channel. When we want to store gray we
need to dot r,g,b together, here back into the red channel to
accommodate future gray-alpha.
Change-Id: I81ad252a35e2534d2d8c6123354b1d19c7018898
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302330
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Add a PixelFormat struct and use it to load/gather_unorm(). This handles
loading all pixel formats that are unorm and can fit in 32 bits, with
float and larger formats to follow. That means this adds SkVMBlitter
support for reading A8, G8, 4444, R8G8, A16_unorm, and R16G16_unorm.
Next step will do the same for stores, allowing arbitrary destinations.
Change-Id: Iabbf6171ee6d5abb44cf131eda6647980767c396
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302252
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
-Adds main comment
-Simplify constructor
-Avoid running trivial destructors (maybe compilers would know to remove the entire loop, but this helps make that clearer).
Change-Id: I3825ef21c0d74933df54ca4f532492e5c997f0e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302642
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This is a reland of 36132b2aea
Original change's description:
> rename MakePath to Make
>
> Change-Id: Ibdee0835308401fce99ff9e4d98486c4808f84a2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302683
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I36c1c0625af8e9afff34d891995ca7aff8f169bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302896
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: Icb34f14d1103a7849813d4b80e7733ba9b743a99
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302638
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>