Bug: skia:11803
Change-Id: I925f14be282b96355721986de6049090b35adf3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:11803
Change-Id: If4c2280585e192eec1b1588dfe022149543584bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391917
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 759bbf7b60.
Reason for revert: Pinpoint regressions when the inliner is off
http://go/crb/1194808#c7
Original change's description:
> Run the inliner on GLES devices only.
>
> We've found that the inliner only gives tangible gains in draw
> performance on GLES devices. (See go/optimization-in-sksl-inliner)
> On other devices, we can skip it and still get the same draw performance
> regardless. A caps bit has been added to indicate a device that will
> benefit from inlining, and the inliner is now disabled on platforms that
> don't set this bit.
>
> Change-Id: I61dfafd7e919deabf81529cea832bb11496410cc
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390300
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,johnstiles@google.com
Change-Id: Ia9ab4db3c3e8a088afa84d4ad3105aa089bf5084
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391858
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This reverts commit 6f67278428.
Reason for revert: Pinpoint regressions when the inliner is off
http://go/crb/1194808#c7
Original change's description:
> Enable the inliner on Intel Windows GPUs.
>
> Disabling it has caused regressions in some test slides.
> Example: http://screen/5dpPVnJukBAcyKb
>
> Change-Id: If302ffd39cd28215c557bbba444d9c8669dea1c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391298
> Commit-Queue: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,johnstiles@google.com
Change-Id: Ida073fd2d467e6167564b8d019578910b9062e2a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391857
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is intended to reduce boilerplate across various constructors which
take a variable number of arguments (vector, array, matrix, etc.).
Today's "universal" Constructor class is now implemented as a subclass
of MultiArgumentConstructor.
Change-Id: Ie4ab601c0c1fb9d9e4d3e77f3346b203d8a62913
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391657
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is intended to reduce boilerplate across future constructors which
can only take a single argument (matrix-resize, typecasting, etc).
Change-Id: I3f55928d83925d0770934dcb4bece193c5d51605
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391304
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
I was mistaken about the life time of the RecordTimeAllocator.
Just allocate the geometries in the heap until an allocator can
be put on the GrSurfaceDrawContext.
Bug: b/182959903
Change-Id: I2378bf3c225acf3dfc153daf6eebb6cbf8ebbaff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391556
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
New alerts realized CanvasKit and PathKit's data has not
been ingested after a change to validation.
Change-Id: I4648beec6a5c10e71959be79389193409991d15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391439
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Change-Id: I1d77b9e10f9c92712f01473d3ae87b191cabb135
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391303
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Creating a new transfer buffer for each readPixels invocation can lead
to huge slowdowns as we progress through tests -- this should speed
things up considerably.
Change-Id: I8e2c2dd78c39d7b8724323637692e4ac185aba59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391305
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: If90e332f0979e8420365b88d440d0d3f7ce5e86a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391438
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
The original code here used a std::recusive_mutex. Looking at the code
I don't see today how any of the code that grabs the mutex could call
back into a function that grabs the mutex again on the same thread.
Maybe this was more of an issue back when this was originally added?
Regardless today it should be safe to just use an SkMutex.
Change-Id: I81c8ea3bf5b2defe893dd9fff7a6a2eda10cace8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391256
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
There's no GPU dimension on these bots yet,
but we can use the CPU to constrain it just fine.
Bug: skia:11334
Change-Id: I2d0928ced7a9145a7160a40ea2a5bd2b1601a01b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390797
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Disabling it has caused regressions in some test slides.
Example: http://screen/5dpPVnJukBAcyKb
Change-Id: If302ffd39cd28215c557bbba444d9c8669dea1c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391298
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This constructor takes a single argument and splats it diagonally across
an otherwise-zero matrix. These are also sometimes referred to as a
uniform-scale matrix.
Change-Id: I1ed8140f55f5cad4029015807b220d6475401daa
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390716
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
These changes cause massive ripple effects in the dehydrated code, so
it's been split out from http://review.skia.org/390716 to its own CL.
Change-Id: I5053ce3cf44ab5050c3a77ac764b4e9c8bfc00d5
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390896
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This will be used by the new stroke tessellator. All the other
tessellators should start chopping and chunking too. That will allow us
to quit cropping paths if we are afraid they might need more segments
than are supported.
Bug: chromium:1172543
Change-Id: I30f0ebb581f56cac099d8c05e0e181c4657c3db8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390096
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
We've found that the inliner only gives tangible gains in draw
performance on GLES devices. (See go/optimization-in-sksl-inliner)
On other devices, we can skip it and still get the same draw performance
regardless. A caps bit has been added to indicate a device that will
benefit from inlining, and the inliner is now disabled on platforms that
don't set this bit.
Change-Id: I61dfafd7e919deabf81529cea832bb11496410cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390300
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This isn't something I expect to occur often. However, we have always
reported that array-ctors with constant arguments are compile-time
constants, and `compareConstant` is supposed to be implemented for all
compile-time constants.
Change-Id: I0bbfe2a3f78c29c14f69c3b6faca71067a0e45c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391116
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:11334
Change-Id: I57343e80cc8b39644c5f189aeee0da229517a726
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390576
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
We don't directly support this today at all. In practice, though, simple
constant arrays are detected as equal in the constant-folding pass
because they hit the `x == x` self-equality check (using
`IsSameExpressionTree`).
This does not work for our inequality tests, though, so those do not
fold.
Change-Id: I6730a9a2d1da9ac613ee58889d651f3ff65b1d2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391057
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Prevents introduction of a bug when modifying a type that is used
with one of these containers in such way that makes the use
unsafe.
Change-Id: I959e6f3bfbc9664a6b0ced636f5ae6cbe72eee1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390676
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Add GrCPixmap, a GrPixmap but with const void* instead of void*. Share
impl via template base class GrPixmapBase.
Change-Id: I7dfdf24a73c1bc8557ff7b90f93a9399da2f3f75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350022
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
We have another thread that may be adding pools back to the available
array the same time we are resetting it. Make sure we grab a mutex before
doing the reset.
Change-Id: I59c6acf7b654d326241f097fc995e17418d5c2e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390480
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This adds the compute binding and dispatch methods to the command list.
For the moment we'll assume we're using root signature layouts that are
similar to the graphics setup -- this can be tweaked later. D3D has
separate bindings for graphics and compute in the same command list, so
the tracking for the active binding has been separated as well.
Change-Id: I5bec820d1fd17bb72a09366c354a7fa77325c6e8
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390516
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This specifically implements this in the vulkan backend to free up
command buffers/pools when the client is trying to free up as much gpu
memory as possible.
Change-Id: I1fecf55c80fe46cfc1d064f9dfbeb36b27c217d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390479
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Simple refactor to make things reusable for the next non-hardware stroke
tessellator.
Change-Id: I0898b54a616e60f0475ac74cbd6f518e8696e0e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390078
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
std::result_of is deprecated and removed in C++20, std::invoke_result is
in C++17 the library so not ready yet.
In the case of SkMakeArray there is no need for the full power of
std::invoke_result as SFINAE is not needed, nor is calling a method
supported. As a result a simple decltype is sufficient.
Bug: skia:11811
Change-Id: I6c07c380970cc2a991ab8bd457997320ba634e6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390476
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Similar to existing SurfaceContextReadPixels but for writes. Tries all
combinations of src/dst color type and alpha type for write pixels.
Always reads back pixels for verification using the ImageInfo of the
tested surface context.
Bug: skia:8862
Bug: skia:11130
Bug: skia:11786
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348886
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Change-Id: I22b38a99c8b4e5b506cd0b94ab9cac3d347f6b2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388236
Previously, the Compiler optimization overrides only supported force-
disabling a particular behavior; we assumed that the default state of
a Compiler was to allow all optimizations. This assumption is about to
be invalidated, as the Inliner will soon be off by default unless you
are using GLES.
The override flags are now a tri-state; optimization and inlining can
be set to "default", "on" or "off".
Change-Id: I5637693222ca1de74ca1073c24d86c8e7c5026f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390136
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>