1. We want to avoid as much overhead as possible in the tiler setup, so do a quick check before handling bounds
2. Compare against current clipbounds instead of devicesize, which may eliminate looping sometimes
Follow-on to https://skia-review.googlesource.com/c/skia/+/119570
Bug: 818693
Bug: 820245
Bug: 820470
Change-Id: If34721c7e467d1ab9e879f25e7b86af6732ca384
Reviewed-on: https://skia-review.googlesource.com/121329
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Otherwise, out/Debug/viewer -m complexclip_bw_invert may crash using
the threaded backend because the clip in the initFn may be wider
than the clip in the drawFn.
Bug: skia:
Change-Id: I3b3ddc9a912fcc155bd30a6bc1f87e24739d1ca6
Reviewed-on: https://skia-review.googlesource.com/121327
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Otherwise, GM fancy_gradients would be drawn incorrectly and TSAN
will issue alerts as SkARGB32_Shader_Blitter has its own memory
that may be written during blitting.
As we make one blitter for each thread, we also don't need to
send in a thread-alloc for blitCoverageDeltas
Bug: skia:
Change-Id: Ie4ee0886b88c797ab57c65674b0b7527501b164f
Reviewed-on: https://skia-review.googlesource.com/120641
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
We will not allocate new mips on a wrapped texture but we will use mips
if the wrapped texture already has one. If we need mips for a draw this
will trigger a copy to occur.
Also some cleanup up of our InternalSurfaceFlags in general.
Bug: skia:7806
Change-Id: I7aa666478cc91bba6e0644b323825fcc9b49793a
Reviewed-on: https://skia-review.googlesource.com/121348
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
These draw as the butt cap version where the stroked circle is clipped by half planes. But then we add in coverage from circles at the caps.
Bug: skia:7793
Change-Id: I7c27a2a5f1f9c1645cc9042e68e787dd81ea28b8
Reviewed-on: https://skia-review.googlesource.com/120140
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This reverts commit ffbe932968.
Reason for revert: guard flag is now in
Original change's description:
> Revert "Cumulate deltas even if they're out of the clip"
>
> This reverts commit 520e578b99.
>
> Reason for revert: guard flag isn't in yet
>
> Original change's description:
> > Cumulate deltas even if they're out of the clip
> >
> > Otherwise, GM complexclip_aa_inverse will be drawn incorrectly
> > in t8888 mode.
> >
> > Bug: skia:
> > Change-Id: I2fe9dd94f3219e3883f713ca95ea3c3d8a49c7ba
> > Reviewed-on: https://skia-review.googlesource.com/121261
> > Reviewed-by: Cary Clark <caryclark@google.com>
> > Commit-Queue: Yuqian Li <liyuqian@google.com>
>
> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:
> Change-Id: If7fa2a8bd1ff3e9b55c3900cbba82a3e2562f502
> Reviewed-on: https://skia-review.googlesource.com/121424
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
TBR=caryclark@google.com,liyuqian@google.com,reed@google.com
Change-Id: I4ec1fec53782a106407d1398c43cab748fd5f259
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/121600
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
This reverts commit 520e578b99.
Reason for revert: guard flag isn't in yet
Original change's description:
> Cumulate deltas even if they're out of the clip
>
> Otherwise, GM complexclip_aa_inverse will be drawn incorrectly
> in t8888 mode.
>
> Bug: skia:
> Change-Id: I2fe9dd94f3219e3883f713ca95ea3c3d8a49c7ba
> Reviewed-on: https://skia-review.googlesource.com/121261
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
TBR=caryclark@google.com,liyuqian@google.com,reed@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: If7fa2a8bd1ff3e9b55c3900cbba82a3e2562f502
Reviewed-on: https://skia-review.googlesource.com/121424
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
When solving for KLM, switches back to normalizing the cubic's
inflection function rather than both individual roots. Also performs
some general code clean up for SkClassifyCubic.
Bug: skia:
Change-Id: Id513e7e02c50a8709f3eccf92fad9e5134d73d83
Reviewed-on: https://skia-review.googlesource.com/121201
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
There is only a need to pass buffers in and out of the system.
All transport is external to the system.
BUG=skia:7515
Change-Id: Ie50cbc3fa1b9776e56dab8e49e91ce640e0b3954
Reviewed-on: https://skia-review.googlesource.com/119893
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit c828109ebd.
Reason for revert: Need to fix flutter
Original change's description:
> Delete getRenderTargetHandle call on SkSurface.
>
> All clients and internal code should be switched (once changes land soon)
> to the new getBackendRenderTarget call instead.
>
> Bug: skia:
> Change-Id: I6f490b6d26a72f37f97216be04e541483206510d
> Reviewed-on: https://skia-review.googlesource.com/121103
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: I571298f839757fcdedcd8117519e740ac7ef1344
Reviewed-on: https://skia-review.googlesource.com/121480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Otherwise, GM complexclip_aa_inverse will be drawn incorrectly
in t8888 mode.
Bug: skia:
Change-Id: I2fe9dd94f3219e3883f713ca95ea3c3d8a49c7ba
Reviewed-on: https://skia-review.googlesource.com/121261
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
It was a mistake to miss it...
This fixes GM bigtext and almost every GM that uses drawPosText
in the t8888 mode.
Bug: skia:
Change-Id: I32d6cc1fd1cde5c8b7caaad9eb3ba6a1706c22a6
Reviewed-on: https://skia-review.googlesource.com/121328
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
This should revert Ganesh's small sigma handling behavior to back before: https://skia-review.googlesource.com/c/skia/+/52400 (Reorganize blur filter to insert new implementation)
BUG=skia:7787
BUG=skia:7751
BUG=832838
Change-Id: I0ce6b888be534afb60336abf561e97741fa34684
Reviewed-on: https://skia-review.googlesource.com/121331
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This variation exploits a sequence which uses a zero
length line to note that lines have been recorded, but
no rectangle edge has been encountered.
R=robertphillips@google.com
Docs-Preview: https://skia.org/?cl=121282
Bug: 824145,skia:7792
Change-Id: I652e9482b2867c3d7da30d5f5df2aecbfd0d716d
Reviewed-on: https://skia-review.googlesource.com/121282
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
Now, according to our gold, we probably are overkilling the DAA.
That could be bad for performance.
Bug: skia:6886 chromium:821353
Change-Id: I92bb4cbedb106f7fbd7e01e8107773d413e2da52
Reviewed-on: https://skia-review.googlesource.com/121260
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
It helps to assign it true instead of false...
TBR=bsalomon@google.com
Bug: skia:
Change-Id: I535333d12a79a3fbc82d68e05cf4c2541fa39fa0
Reviewed-on: https://skia-review.googlesource.com/121247
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This is triggered by a recent change to clear the looper from the paint we return.
That change made the call to nothingToDraw() return true, which in turn meant
we didn't get the balancing call to restore in the looper's next() call.
Follow-up to https://skia-review.googlesource.com/c/skia/+/121062
Bug: skia:
Change-Id: I3ba7d487e4193103fb1d223d34c9c6eb486eca09
Reviewed-on: https://skia-review.googlesource.com/121220
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Bug: skia:
Change-Id: I53508c4e3bbd4c315be4b29a66716e0c5e7f25bf
Reviewed-on: https://skia-review.googlesource.com/121161
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This variation tricks SkPath::isRect by exploiting
that the implementation resets the point pointer to
process the close verb, and using the reset pointer
to walk over a series of points that don't move.
In addition to fixing this, rename variables to
make the line creation more obvious, since left,
right, and friends, are not the left and right.
R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: If8ebbc3eedd270652670d6e111a5bc02e61f0eec
Reviewed-on: https://skia-review.googlesource.com/121122
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
All clients and internal code should be switched (once changes land soon)
to the new getBackendRenderTarget call instead.
Bug: skia:
Change-Id: I6f490b6d26a72f37f97216be04e541483206510d
Reviewed-on: https://skia-review.googlesource.com/121103
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: oss-fuzz:7452
Change-Id: Id1b9bd1ad9245f32d69b7ce97544955fcde5670f
Reviewed-on: https://skia-review.googlesource.com/121102
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This saves us from doing lots of throwaway decoding work if the image
can't be uploaded.
This is based on -- but doesn't entirely fix --
https://github.com/flutter/flutter/issues/16454
Change-Id: I4025f31f1334b715a04b4503aeb4f857851b5772
Reviewed-on: https://skia-review.googlesource.com/121104
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This allows the tiler to optimally visit only the tiles that might intersect
the drawing. Not all call-sites can cheaply compute their bounds, so for those
we just pass nullptr, which tells the tiler to visit all of the tiles.
Bug: 818693
Bug: 820245
Bug: 820470
Change-Id: I8bda668a99bcdb2a9a74a8278ec0cf1004acba6e
Reviewed-on: https://skia-review.googlesource.com/119570
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This addresses comment #17 of skbug.com/7792.
The bug overshoots the end and exploits that the
first point tracked by close isn't the first
point in the rectangle.
Fixing this slightly regresses the example
in comment #14; before it was treated as a filled
rect but now it is not; this conservative approach
doesn't cause any other regressions.
bug7792 in pathfill.cpp verifies that all paths
in the bug draw correctly by comparing CPU and GPU.
R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I55bea023d2ad7456c8c3ebd9d1df95fe34e0a0d4
Reviewed-on: https://skia-review.googlesource.com/120996
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: I7d37a76bcb9df9c5a1c22eb1b0277387816df7bb
Reviewed-on: https://skia-review.googlesource.com/120602
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
In particular, anything that forces an instantiation is forbidden.
Change-Id: I3cf83a6fdedb03105dda7d928b9c0f73315199cc
Reviewed-on: https://skia-review.googlesource.com/120421
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: Icf235dea81e9f125c1c8590ec87cb3591393036c
Reviewed-on: https://skia-review.googlesource.com/120281
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
More edge cases found; clean up the logic a bit
to make more clear where the rectangle points
start and stop.
R=robertphillips@google.com,brianosman@google.com
Bug: 824145,skia:7792
Change-Id: Ie24dfd1519f30875f44ffac68e20d777490b00b9
Reviewed-on: https://skia-review.googlesource.com/120422
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>