This renumbers all the dehydrated data.
Change-Id: I94c58c7f0b36e9832f47151b9d350e66f9fa01cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392118
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This was accidentally overlooked during the initial migration.
Change-Id: I8d50207ecfdc5228e5f2b34bf0ed1bee33b5d650
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392116
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Atlas clips always had a potential point of failure: If the SDC's
opsTask ever got closed between GrClip::apply and
GrOpsTask::addDrawOp, their mask would have gotten sent to the wrong
opsTask. It didn't _look_ like this could happen with the current
code, but it could have also been inadvertently changed quite easily.
This CL adds a "pathsForClipAtlas" array for GrClip::apply to fill out
instead of creating FPs. The SDC then generates the actual clip atlas
FPs once it knows exactly which opsTask they will belong in.
Bug: chromium:928984
Change-Id: I507ab13b2b5e8c3c3c1916d97611297dbbd8a522
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389926
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change-Id: Ia8c8a3476202257ecc100f9cb31e6d0095135aa1
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391919
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I37202f26bd1d990f80528f490ccd7e99cbc2139f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392056
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
These changes cause massive ripple effects in the dehydrated code, so
they're being landed in their own CL.
Change-Id: Ia66bbe02dd58ed50da303f40480d396d75fa6ecd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391300
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This is mostly just to work around bug in raster backend.
Bug: skia:11822
Change-Id: I7c5af9dca36dac3eee4948f2a127fee6d314cf55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391916
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Using an SkSpan, we can make a base class which encompasses every type
of Constructor while still letting the subclasses choose how their
storage is laid out.
Change-Id: I6faa3456acfb7e9e76725512bbe932935d17e017
Bug: skia:11032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391778
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
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>