Mechanically updated via Xcode "Replace Regular Expression":
typedef (.*) INHERITED;
-->
using INHERITED = $1;
The ClangTidy approach generated an even larger CL which would have
required a significant amount of hand-tweaking to be usable.
Change-Id: I671dc9d9efdf6d60151325c8d4d13fad7e10a15b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/314999
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Also, move first-direction into SkPathRef.h so it can be referenced
by name in SkPath (instead of using uint8_t)
No functional change expected.
Change-Id: Ica4a8357a8156fd9a516118f23599a965b0fdd47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Subsequent CLs can work on combining convexity and direction
Bug: skia:10670
Change-Id: Ia44769ea88ffd99a56d4c6729a80a2044e790ec2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313837
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html
Adds override (introduced in C++11) to overridden virtual functions and
removes virtual from those functions as it is not required.
virtual on non base class implementations was used to help indicate to
the user that a function was virtual. C++ compilers did not use the
presence of this to signify an overridden function.
Change-Id: If66d8919358f72a4035190caf8d7569268037a9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310160
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
The current limit of 78 is quite conservative, and we see no diffs via
gold when using a limit of 24. This also fixes a timeout uncovered by a
fuzzer.
Bug: oss-fuzz:23989
Change-Id: I0d7c33afca7e7e852bedfea52b104d6c7d8fcfd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301938
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This reverts commit c80ee456ad.
fix: update flutter's gn file to add guard
Change-Id: Iac5171c8475d9a862d06255dab1c6f38f10de2f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Use std::max and std::min instead
Change-Id: Icf3796609e5cb511687fb50bd31229ae4b6b9b39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268841
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 1792b19485.
Reason for revert: need to update legacy_convexity, still used by google3
Original change's description:
> Revert "Revert "Use flat version of path-direction enum""
>
> This reverts commit 0dacc6b7d3.
>
> Change-Id: Ie103e9f36b07e4ee256a3688a4decf3a6dd74314
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255832
> Auto-Submit: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=reed@google.com
Change-Id: I0ecea0eb8a237298c6b908cc4bfd1cacdfc5b900
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255976
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 0dacc6b7d3.
Change-Id: Ie103e9f36b07e4ee256a3688a4decf3a6dd74314
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255832
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit e0fbe94351.
Reason for revert: need to add guard flag to flutter
Original change's description:
> Use flat version of path-direction enum
>
> Bug: skia:9663
> Change-Id: I00077d9f2b14b3e983e6a46ef6f560cabdb1678d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242557
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
TBR=fmalita@chromium.org,reed@google.com
Change-Id: If47173d9b203b2d3a175af290a15d986accb4703
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9663
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255831
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Bug: skia:
Change-Id: I5bd0194a49c74a8e47a210ff06ef4406ecb3bc4c
Reviewed-on: https://skia-review.googlesource.com/c/175585
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
That breaks the assumption that the work is proportional to loops.
For example, loops = 5 and loops = 7 would result in the same count
if count = loops / 4.
Bug: skia:
Change-Id: Idae86d658cbfba8a7f49b983ed61a8b7fbea007a
Reviewed-on: https://skia-review.googlesource.com/46600
Commit-Queue: Yuqian Li <liyuqian@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Previosly, SkSize had a base class, which prevented it.
Also removes unused SkISize::clampNegToZero() and
SkSize::clampNegToZero().
Change-Id: I7b93b42f6f6381c66e294bbedee99ad53c6c3436
Reviewed-on: https://skia-review.googlesource.com/13187
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
not sure about api -- perhaps it could just return the bounds, and make them 0,0,0,0 if the path
is empty -- the caller can trivially know if the path is empty themselves.
BUG=skia:
Change-Id: I2dbb861e8d981b27c5a6833643977f5bd6802217
Reviewed-on: https://skia-review.googlesource.com/7989
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 1e74cad9b4.
Reason for revert: the guard flag has now been confirmed to be landed on chromium/src. We should now be able to pass the layout tests.
Original change's description:
> Revert "Improve quad edges' smoothness in non-AA cases"
>
> This reverts commit d4ed326d6f.
>
> Reason for revert: reverting temporarily to get us rolling into Chrome again.
>
> Must be this CL right?
> https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/3364/layout-test-results/results.html
>
> Original change's description:
> > Improve quad edges' smoothness in non-AA cases
> >
> > Previously, non-AA quad edges only have an accuracy about 1/2 pixel
> > (while the AA quad edges have an accuracy about 1/8 pixel). Now, we
> > increase non-AA quad edges' accuracy to 1/8 pixel as well.
> >
> > The difference is very significant for rotating non-AA filled circles.
> > For example, run `./out/Debug/SampleApp --slide GM:fillcircle` with AA
> > turned off (by pressing b).
> >
> > The benchmark added reveals that increasing quad accuracy from 1/2 to
> > 1/8 doesn't affect the performance significantly. The following is the
> > 1/2-accuracy performance versus 1/8-accuracy performance:
> >
> > curr/maxrss loops min median mean max stddev samples
> > config bench
> > 7/17 MB 19 2.43µs 2.57µs 2.81µs 10.5µs 22% 16119
> > 8888 path_fill_big_nonaacircle
> > 7/17 MB 17 1.38µs 1.42µs 1.52µs 13µs 20% 21409
> > 8888 path_fill_small_nonaacircle
> >
> > curr/maxrss loops min median mean max stddev samples
> > config bench
> > 7/17 MB 71 2.52µs 2.59µs 2.79µs 7.67µs 19% 7557
> > 8888 path_fill_big_nonaacircle
> > 7/17 MB 64 1.45µs 1.49µs 1.51µs 2.39µs 5% 12704
> > 8888 path_fill_small_nonaacircle
> >
> >
> > BUG=skia:
> >
> > Change-Id: I3482098aeafcc6f2ec9aa3382977c0dc1b650964
> > Reviewed-on: https://skia-review.googlesource.com/6699
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Yuqian Li <liyuqian@google.com>
> >
>
> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com,djsollen@google.com,bungeman@google.com,reviews@skia.org,fmalita@chromium.org
> BUG=skia:
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I5bc4596ab506f6f61ac2da91a07cf51d61114f31
> Reviewed-on: https://skia-review.googlesource.com/6829
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
>
TBR=djsollen@google.com,mtklein@google.com,bungeman@google.com,reviews@skia.org,caryclark@google.com,fmalita@chromium.org,liyuqian@google.com,reed@google.com
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I0ec2ea8dc0c6ad0ebdcb48878fb301c32443a09e
Reviewed-on: https://skia-review.googlesource.com/6858
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
This reverts commit d4ed326d6f.
Reason for revert: reverting temporarily to get us rolling into Chrome again.
Must be this CL right?
https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/3364/layout-test-results/results.html
Original change's description:
> Improve quad edges' smoothness in non-AA cases
>
> Previously, non-AA quad edges only have an accuracy about 1/2 pixel
> (while the AA quad edges have an accuracy about 1/8 pixel). Now, we
> increase non-AA quad edges' accuracy to 1/8 pixel as well.
>
> The difference is very significant for rotating non-AA filled circles.
> For example, run `./out/Debug/SampleApp --slide GM:fillcircle` with AA
> turned off (by pressing b).
>
> The benchmark added reveals that increasing quad accuracy from 1/2 to
> 1/8 doesn't affect the performance significantly. The following is the
> 1/2-accuracy performance versus 1/8-accuracy performance:
>
> curr/maxrss loops min median mean max stddev samples
> config bench
> 7/17 MB 19 2.43µs 2.57µs 2.81µs 10.5µs 22% 16119
> 8888 path_fill_big_nonaacircle
> 7/17 MB 17 1.38µs 1.42µs 1.52µs 13µs 20% 21409
> 8888 path_fill_small_nonaacircle
>
> curr/maxrss loops min median mean max stddev samples
> config bench
> 7/17 MB 71 2.52µs 2.59µs 2.79µs 7.67µs 19% 7557
> 8888 path_fill_big_nonaacircle
> 7/17 MB 64 1.45µs 1.49µs 1.51µs 2.39µs 5% 12704
> 8888 path_fill_small_nonaacircle
>
>
> BUG=skia:
>
> Change-Id: I3482098aeafcc6f2ec9aa3382977c0dc1b650964
> Reviewed-on: https://skia-review.googlesource.com/6699
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
>
TBR=caryclark@google.com,liyuqian@google.com,reed@google.com,djsollen@google.com,bungeman@google.com,reviews@skia.org,fmalita@chromium.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I5bc4596ab506f6f61ac2da91a07cf51d61114f31
Reviewed-on: https://skia-review.googlesource.com/6829
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Previously, non-AA quad edges only have an accuracy about 1/2 pixel
(while the AA quad edges have an accuracy about 1/8 pixel). Now, we
increase non-AA quad edges' accuracy to 1/8 pixel as well.
The difference is very significant for rotating non-AA filled circles.
For example, run `./out/Debug/SampleApp --slide GM:fillcircle` with AA
turned off (by pressing b).
The benchmark added reveals that increasing quad accuracy from 1/2 to
1/8 doesn't affect the performance significantly. The following is the
1/2-accuracy performance versus 1/8-accuracy performance:
curr/maxrss loops min median mean max stddev samples
config bench
7/17 MB 19 2.43µs 2.57µs 2.81µs 10.5µs 22% 16119
8888 path_fill_big_nonaacircle
7/17 MB 17 1.38µs 1.42µs 1.52µs 13µs 20% 21409
8888 path_fill_small_nonaacircle
curr/maxrss loops min median mean max stddev samples
config bench
7/17 MB 71 2.52µs 2.59µs 2.79µs 7.67µs 19% 7557
8888 path_fill_big_nonaacircle
7/17 MB 64 1.45µs 1.49µs 1.51µs 2.39µs 5% 12704
8888 path_fill_small_nonaacircle
BUG=skia:
Change-Id: I3482098aeafcc6f2ec9aa3382977c0dc1b650964
Reviewed-on: https://skia-review.googlesource.com/6699
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
GLBenches do not expect gl state to change between onPerCanvasPreDraw and *PostDraw, but we do a clear and sometimes we clear as draw. This causes us to bind vertex objects / programs / etc.
This change creates two new virtual methods which are called right before and immediately after timing.
BUG=skia:
Review URL: https://codereview.chromium.org/1379853003
(and a couple presubmit fixes)
This allows us to turn back on -Werror for LLVM coverage builds,
and more generally supports building with Clang 3.7.
No public API changes.
TBR=reed@google.com
BUG=skia:
Review URL: https://codereview.chromium.org/1232463006
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases. We'll have to manually clean up the rest
over time unless I level up in regexes.
for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end
BUG=skia:
Review URL: https://codereview.chromium.org/806653007
Memory usage grows unbounded in path_create without this patch (growing the
paths). This bench also somewhat needlessly cycles through 32 paths, so now
we just work with one.
Peak memory usage drops from ~2-3G to ~150M. This should fix the NexusS crashes,
or at least get us to the next one.
BUG=skia:1687
R=caryclark@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/111283007
git-svn-id: http://skia.googlecode.com/svn/trunk@12925 2bbb7eff-a529-9590-31e7-b0007b416f81
I'm not quite sure why I wrote such a convoluted API with setLoops()/getLoops().
This replaces it with a loops argument passed to onDraw().
This CL is largely mechanical translation from the old API to the new one.
MathBench used this->getLoops() outside onDraw(), which seems incorrect. I
fixed it.
BUG=
R=djsollen@google.com
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/99893003
git-svn-id: http://skia.googlecode.com/svn/trunk@12466 2bbb7eff-a529-9590-31e7-b0007b416f81
Adds "grresourcecache_add" and "grresourcecache_find" bench tests to test
GrResourceCache::add and GrResourceCache::find. The tests work only
with GPU backends, since GrResourceCache needs an GrGpu.
Modifies bench tests to override SkBenchmark::isSuitableFor(Backend)
function that specifies what kind of backend the test is inteded
for. This replaces the previous "fIsRendering" flag that would
indicate test that did no rendering.
Adds SkCanvas::getGrContext() call to get the GrContext that the
canvas ends up drawing to. The member function solves a common
use-case that is also used in the benchmark added here.
R=mtklein@google.com, bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/73643005
git-svn-id: http://skia.googlecode.com/svn/trunk@12334 2bbb7eff-a529-9590-31e7-b0007b416f81
Using Mike Klein's excellent coverage tool, increase the
unit testing of SkPath.cpp from 70% to 95%.
Along the way, determined that these functions were not
maintained or used:
SkPath::pathTo
SkPath::contains
as well as a large block of SkPath::cheapGetDirection().
Changed SkPath::validate() to permit infinities in
the path data points.
Fixed errors in preserving direction.
Fixed error setting direction when convexity is unknown.
Added missing conic to moveTo only detector.
BUG=
R=bsalomon@google.com, reed@google.com
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/65493004
git-svn-id: http://skia.googlecode.com/svn/trunk@12291 2bbb7eff-a529-9590-31e7-b0007b416f81