This reverts commit aa98dd3d27.
Reason for revert: broke chrome, easy to add a flag there
Original change's description:
> fix sense of ifdef for deprecated method
>
> Change-Id: I32164225750b23e1cc26aa36a60feda27bbd90a8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257319
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=bungeman@google.com,kjlubick@google.com,fmalita@chromium.org,reed@google.com
Change-Id: I629bbd7f04a4ac8227c62f4d05cf2cb2601900c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257328
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit 3e7af41224.
Change-Id: Id4f66b3956f4bdbe690db20fc478b7365ee89717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@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>
As part of this (clean up), also removed support for serialized-paths
older than version-4, which was introduced Feb 2018.
Change-Id: I2dc74a52bb8bdd7ea0cb2d8a78b644ca783eb31f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239102
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This reverts commit e67133b8e5.
Removing testing code that's no longer needed.
Change-Id: I27bc5c77d1bc1b928d5cdb89daf82ab5fd3878c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236338
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I3be1a4d402a3a7adc6a28d716302d3c9f9316b14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This does not appear to be used externally, and only internally in 3
sites in GPU, which we can handle explicitly.
For now you can still pass bools to Iter::next() but they are ignored.
After this lands, I will update the callers to remove those.
FWIW: none of our other tests or gms seem to notice this change...
Bug: skia:9339
Change-Id: If40077b1ebb3d47cfce0ec43996ff272318e4a62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235104
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Reed <reed@google.com>
The new API eliminates all need to access the path inner workings.
There are some uses of the cast (SkGlyph*) these are to facilitate
the larger change this is a part of. The will be eliminated when all
is done.
Some of the code has been changed to use strike->glyph(id) and SkGlyph*
to help with the flow of the code.
Change-Id: Id8dc84076f56e1e39450367a0440d15954dbdc71
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220523
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@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>
We're moving in a different direction for Skia documentation. We no
longer run bookmaker on the bots, and things have already degraded such
that it can't be run. This leaves the generated markdown in place for
the last set of docs that were generated (which are still useful until
the Doxygen docs catch up).
See also: https://skia-review.googlesource.com/c/skia/+/198162
Docs-Preview: https://skia.org/?cl=203464
Bug: skia:
Change-Id: I2f967a9c17dbc1cc899947d365071ef69cfb8ad7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203464
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I1fd8cba067c0063c6621641e8196e69fd5e31cec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203080
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Use RawIter, so we can dependably peek() (since consumeDegenerates in
Iter() make peeking unreliable), which caused us to think there were two
real contours in the test case.
Bug: oss-fuzz:13013
Change-Id: I0d85f3e6a83cb972c4d801dd9b17f0e388b926d0
Reviewed-on: https://skia-review.googlesource.com/c/192025
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Chrome added a public method to validate SkPathRef,
but always called it when validating SkPath. We did too.
Remove the SkPathRef entry point, validate SkPathRef
when validating SkPath, and remove Skia's callers.
(Chrome has already been fixed.)
TBR=reed@google.comR=fmalita@chromium.org
Bug:913930
Change-Id: I0828b00b42cc1f031b4216ddeace50f80aa21e62
Reviewed-on: https://skia-review.googlesource.com/c/177065
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
- Replace sk_memory_order with std::memory_order.
- Remove SkAtomic<T>.
SkPath was the only user of SkAtomic<T>, for its fConvexity and
fFirstDirection fields. I've replaced them with std::atomic types, and
funneled access to them through methods that enforce the relaxed memory
order like SkAtomic<T> did.
For fConvexity, we can use the exisiting setConvexity() and
getConvexityOrUnknown() methods, adding a private const setConvexity()
to mutate convexity from const methods. For fFirstDirection I've added
private setFirstDirection() and getFirstDirection() methods.
Removing SkAtomic<T> means SkAtomics.h no longer needs SkNoncopyable.h.
I've had to update a bunch of other headers that were depending on
transitive inclusion.
Change-Id: Ib238be71a121519db6e970a9a8955834e1298c87
Reviewed-on: https://skia-review.googlesource.com/c/174220
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bookmaker does not require documentation for public symbols
described as "deprecated", "private", or "experimental".
Adding one of these words (case-insensitive) to the symbol
description in the include file tells bookmaker that the bmh file
should not include documentation, and the generated markdown
should omit it in its indices and descriptions.
Symbols marked as "to be deprecated" or "may be deprecated"
are still regarded as public and documented.
Private notes in the includes that start with TODO: are
omitted as well.
This CL updated generated includes to describe its symbols
accordingly. The includes will be fully regenerated in a future
CL. The corresponding documentation has been deleted from the
bmh files, and the web markup has been regenerated.
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=169830
Bug: skia:
Change-Id: Ie6ec3ccdadb7be9ac15db4811823a30948c4af25
Reviewed-on: https://skia-review.googlesource.com/c/169830
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
It was only supported for ANDROID_FRAMEWORK, which no longer uses it.
(It looks like the last use was removed with
ag/I18bfe51896672272ce7d471eaead69b651399368.)
Change-Id: Ia0811a8625d6a20ae7411a7578a5358ff1cc1a37
Reviewed-on: https://skia-review.googlesource.com/c/170480
Auto-Submit: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This is a reland of 166dbd3135
Since last attempt,
- update SkPath::Direction docs
- kIllegal is not an advanced blend mode
Original change's description:
> make enum santizer fatal
>
> This enum sanitizer checks that all the values of the enum we use fall
> within the range of the enumerated values.
>
> The main thing this helps point out is that the size of enum types in
> C++ need only be large enough to hold the largest declared value; larger
> values are undefined. In practice, most enums are implemented as ints
> for compatibility with C, so while this hasn't pointed out anything
> egregiously broken, the sanitizer has found a couple possibly dangerous
> situations in our codebase.
>
> For most types using values outside the enum range, we can just
> explicitly size them to int. This makes their de facto size de jure.
>
> But we need to actually make GrBlendEquation and GrBlendCoeff not store
> values outside their enumerated range. They're packed into bitfields
> that really can't represent those (negative) values. So for these I've
> added new kIllegal values to the enums, forcing us to deal with our
> once-silent illegal values a bit more explicitly.
>
> Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
> Reviewed-on: https://skia-review.googlesource.com/c/168484
> Reviewed-by: Brian Osman <brianosman@google.com>
Cq-Include-Trybots: skia.primary:Housekeeper-PerCommit-Bookmaker,Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Debug-All-Android
Change-Id: Id93b80bbeae11872542c9b76715e3c3cb10609fd
Reviewed-on: https://skia-review.googlesource.com/c/168582
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 166dbd3135.
Reason for revert: illegal is not advanced, docs
Original change's description:
> make enum santizer fatal
>
> This enum sanitizer checks that all the values of the enum we use fall
> within the range of the enumerated values.
>
> The main thing this helps point out is that the size of enum types in
> C++ need only be large enough to hold the largest declared value; larger
> values are undefined. In practice, most enums are implemented as ints
> for compatibility with C, so while this hasn't pointed out anything
> egregiously broken, the sanitizer has found a couple possibly dangerous
> situations in our codebase.
>
> For most types using values outside the enum range, we can just
> explicitly size them to int. This makes their de facto size de jure.
>
> But we need to actually make GrBlendEquation and GrBlendCoeff not store
> values outside their enumerated range. They're packed into bitfields
> that really can't represent those (negative) values. So for these I've
> added new kIllegal values to the enums, forcing us to deal with our
> once-silent illegal values a bit more explicitly.
>
> Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
> Reviewed-on: https://skia-review.googlesource.com/c/168484
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com
Change-Id: I691c08092340a6273e442c0f098b844f7d0363ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/168581
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This enum sanitizer checks that all the values of the enum we use fall
within the range of the enumerated values.
The main thing this helps point out is that the size of enum types in
C++ need only be large enough to hold the largest declared value; larger
values are undefined. In practice, most enums are implemented as ints
for compatibility with C, so while this hasn't pointed out anything
egregiously broken, the sanitizer has found a couple possibly dangerous
situations in our codebase.
For most types using values outside the enum range, we can just
explicitly size them to int. This makes their de facto size de jure.
But we need to actually make GrBlendEquation and GrBlendCoeff not store
values outside their enumerated range. They're packed into bitfields
that really can't represent those (negative) values. So for these I've
added new kIllegal values to the enums, forcing us to deal with our
once-silent illegal values a bit more explicitly.
Change-Id: Ib617694cf1aaa83ae99289e9e760f49cb6393a2f
Reviewed-on: https://skia-review.googlesource.com/c/168484
Reviewed-by: Brian Osman <brianosman@google.com>
In preparation for upcoming changes to bookmaker
which validate more include contents, revise
generated files in include/core to fix various
errors.
Fixes include:
- references in comments to other Skia interface elements
- @param names agree with function declarations
- spelling typos
- generic references (e.g. 'x' in place of 'x-axis')
- lines longer than 100 columns
The fix to SkPath::rCubicTo triggered a parallel
fix to SkPath_Reference.bmh; other wed documentation
fixes will be in an upcoming CL.
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=166680
Bug: skia:
Change-Id: If734696dc64655f1cf40b121a180210c932b1d89
Reviewed-on: https://skia-review.googlesource.com/c/166680
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Change-Id: I76ab59d963cebf6cbb450e1873c3e0c63f3f2da0
Reviewed-on: https://skia-review.googlesource.com/155560
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This fixes all comments in generated includes
to fit in 100 columns.
TBR=reed@google.com
Bug: skia:6898
Change-Id: I6d28a24d4e2d079e4a9284d4b2a25326dc5f2dc6
Reviewed-on: https://skia-review.googlesource.com/154440
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Several generated includes include code that exceeds the 100 column
limit. Fix the code that exceeds 100 columns here.
In a later CL, bookmaker will fix the comments that
exceed 100 columns.
TBR=reed@google.com
Bug: skia:6898
Change-Id: I8b44b01675e99c5750f3c89689f29bb709203ec2
Reviewed-on: https://skia-review.googlesource.com/154303
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
sizeof(SkPath): 24 -> 16 (on 64bit)
Change-Id: Iea0d363b70209eb984c816f9fba59c461fe42cec
Reviewed-on: https://skia-review.googlesource.com/154041
Reviewed-by: Mike Klein <mtklein@google.com>
Add header and .bmh docs for shrinkToFit().
Also remove SkPath::debugging_private_getFreeSpace() and refactor tests
to use (friended) helper classes.
Docs-Preview: https://skia.org/?cl=153668
Change-Id: I3f93f9561b25025ce04a81d5e2f0271295b3daad
Reviewed-on: https://skia-review.googlesource.com/153668
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
SkPath now returns reference to itself.
There's also a new addPoly() variant.
Update the docs to match.
TBR=reed@google.com,kjlubick@google.com
Docs-Preview: https://skia.org/?cl=147216
Bug: skia:6818
Change-Id: I0e40e942cc46a8994285dfea4c81e2042a4e689c
Reviewed-on: https://skia-review.googlesource.com/147216
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
generate include documentation for the first time
for SkRegion.h and SkTextBlob.h, and refresh a
few others.
TBR=reed@google.com
Bug: skia:6818
Change-Id: Ie8ad53095b3d7c5d8418c6cf2163a749ab6ecb53
Reviewed-on: https://skia-review.googlesource.com/146704
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
the newest ones (SkBlendMode.h, SkPicture.h, SkRRect.h)
need additional editing; enough has changed that it is
time to refresh anyway.
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=141043
Bug: skia:6818
Change-Id: Ic123b02f57005a087f8655cafa1a2537529beca5
Reviewed-on: https://skia-review.googlesource.com/141043
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Found some bookmaker bugs that were suppressing
spelling errors and syntax errors.
TBR=reed@google.com
Bug: skia:6898
Change-Id: Ie7331dd03723d987cb2df46018a984f42d0ee518
Reviewed-on: https://skia-review.googlesource.com/134942
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>