Bug: skia:
Change-Id: I5ed334f63e64991944394dc8103092a2c6280546
Reviewed-on: https://skia-review.googlesource.com/122000
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Changes to warnings in clang introduced by https://reviews.llvm.org/D43322
and https://reviews.llvm.org/D44883 cause warning as error failures when
building Skia. In particular this addresses return-std-move-in-c++11 and
self-assign-overloaded.
Change-Id: I680318098d8af1b64fba464585c7cdfcfcf39d66
Reviewed-on: https://skia-review.googlesource.com/123582
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
SkColorSetARGBMacro and SkColorSetARGBInline
are macros which will be deleted. Replace them
with a standard equivalent.
R=scroggo@google.com
Bug: skia:6898
Change-Id: I16e010776e991c19a375d0686ecd1b1cc4c59a9b
Reviewed-on: https://skia-review.googlesource.com/123501
Auto-Submit: Cary Clark <caryclark@skia.org>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This is a reland of 3b8feb331a
Original change's description:
> call skcms_OptimizeForSpeed()
>
> I've guarded src and dst separately, so that we can land,
> rebaseline just the src change, and then later (when it
> does something), rebaseline optimizing dst separately.
>
> Small threshold tweak to keep a unit test passing.
>
> Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0
> Reviewed-on: https://skia-review.googlesource.com/123181
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Ia29b4c941e121486a627ac7221947f4a452211ad
Reviewed-on: https://skia-review.googlesource.com/123480
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 255bcf57ff.
Reason for revert: layout and scuba image diffs
Original change's description:
> Add arcs as a specialized geometry to GrShape.
>
> BUG: skia:7794
>
> Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d
> Reviewed-on: https://skia-review.googlesource.com/122900
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: I9293b8fbb535d940bca5fc30a95908416b9eb7a7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/123362
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 3b8feb331a.
Reason for revert: darks too bright
Original change's description:
> call skcms_OptimizeForSpeed()
>
> I've guarded src and dst separately, so that we can land,
> rebaseline just the src change, and then later (when it
> does something), rebaseline optimizing dst separately.
>
> Small threshold tweak to keep a unit test passing.
>
> Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0
> Reviewed-on: https://skia-review.googlesource.com/123181
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=mtklein@chromium.org,brianosman@google.com
Change-Id: I23e59d4dc711e8b112e70f31a5c9abad67551bcd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/123361
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I've guarded src and dst separately, so that we can land,
rebaseline just the src change, and then later (when it
does something), rebaseline optimizing dst separately.
Small threshold tweak to keep a unit test passing.
Change-Id: I57cc43c54b6065f58fa8f9448ea1d73fc42505f0
Reviewed-on: https://skia-review.googlesource.com/123181
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: Ifa8dbad3eca81790648476f9a6d3fa5a088fede9
Reviewed-on: https://skia-review.googlesource.com/122341
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This was triggered by an exploit that started the first
edge well outside the final rectangle, causing the captured
to exceed the correct result.
Ivan observes that we really only want the first and third
corners to compute the bounds, so remove the tracking code
that looks for a valid range of points, and record the
corners instead.
R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: If228573d0f05c7158dba8142c144d13834e691ec
Reviewed-on: https://skia-review.googlesource.com/122081
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
SkTDynamicHash doesn't immediately recycle slots for removed entries,
but instead just marks them as deleted.
The only way to reclaim deleted slots currently is when an exponential
grow/resize is triggered.
A consequence of this is that the capacity/allocated storage can grow
indefinitely when the hash is long-lived and churning -- even if the
number of active entries is small/stable.
To prevent this, I propose we only grow the capacity when the number of
active slots constitutes a significant portion. Otherwise (when most
slots are deleted), we trigger a "purge" (resize to the same capacity)
to clear the tombstones.
Bug: chromium:832482
Change-Id: Iefdcd7439f7d62ac021e176b71007d207c8bc876
Reviewed-on: https://skia-review.googlesource.com/122082
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
We were missing a few that got unreffed due to failed proxy
instantiation.
Bug: skia:7655
Bug: skia:7111
Change-Id: I95847a16890f2993a1433d4d9fdaa8a4a6c2f0b6
Reviewed-on: https://skia-review.googlesource.com/122121
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
One of the path is rect bug fixes changed
the behavior of zero-length strokes which
showed up as a change in Gold.
The bug is if a rect is defined by a
series of colinear movetos, the bounds
did not work out if the rect started
and stopped in the middle of a side.
R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I226545efeda03dedd928eebc120d2508b428fef0
Reviewed-on: https://skia-review.googlesource.com/122002
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
With the recent changes to GrBackendTexture and the atomic ref counted
GrVkImageLayout, this should not longer be an issue for cross context
images. There still is the requirement that they need to manually
synchronize the submission of work involving the image on two threads,
but that is a requirement regardless of layout issues.
Bug: skia:
Change-Id: Ia86e51fda8606838dabd1bc36cf14c7679b46d49
Reviewed-on: https://skia-review.googlesource.com/121349
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Removed a test that appeared to go uncalled;
Ivan to the rescue, with a test case
proving that it is required.
R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I7df9688072bd36b7597673148e3fe5dbbf82f5a7
Reviewed-on: https://skia-review.googlesource.com/121883
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Exposes that final close along a diagonal need not
include a close verb if the subsequent verb is move;
so we have to check for a diagonal then.
The later check for diagonal included a comment that
it may not be needed which does appear to be the case.
R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: I17a9414e8b3e69b82c2eda28195696eae4e3d513
Reviewed-on: https://skia-review.googlesource.com/121801
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This one accumulates the othershoot when all four sides
have the same direction, and the final side when closed
should cause the overshoot to be ignored.
Docs-Preview: https://skia.org/?cl=121787
Bug: 824145,skia:7792
Change-Id: I71ea0fcdd0f03a4fcac224b57220c65c321112f6
Reviewed-on: https://skia-review.googlesource.com/121787
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This is bug number ten in the series, and is the
most interesting. It exploits that the code tracks
corners 0, 2, and 3 but not corner 1.
Changing the code to track all corners is the biggest
so far, and while it (hopefully) simplifies things,
the presence of new code may signify more bugs to come.
R=robertphillips@google.com
Bug: 824145,skia::7792
Change-Id: Ia18e4d80fbed06ae6d9c89dcb4c462c5610213cc
Reviewed-on: https://skia-review.googlesource.com/121487
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
The original intent of this flag is now handled by SkPixelGeomety on
SkSurfaceProps on SkSurface.
BUG=skia:7515
Change-Id: I54bb1be072b5b5b2164a59196bfeacac254823c7
Reviewed-on: https://skia-review.googlesource.com/121346
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@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>
Uses less stack space in test functions.
Change-Id: I50a66cc27d95c2b4e2292184b928f7bbd71789f0
Reviewed-on: https://skia-review.googlesource.com/121482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@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>
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>
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>
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>