- add links to types within methods
- add check to see that all references and definitions match
- add style to tables to make them easier to read
- use https everywhere
- remove trailing spaces
- move overview inside class
- split class and struct in summary tables
- add missing #Line
- clean up SkImageInfo constant documentation
- work on SkColor documentation
- allow common phrases to take different parameters
- add more flexibility to generated tables
- tighten token parent requirements
- generalize deprecated and example interfaces
- detect inner constructors
R=caryclark@google.com
Docs-Preview: https://skia.org/?cl=121799
Bug: skia:6898
Change-Id: Ia75a23740b80259460916890b310e2a9f024962a
Reviewed-on: https://skia-review.googlesource.com/121799
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Anonymous enums play havoc with documentation;
there's no name to refer to. It may be that all
enums may either be named or replaced with constexpr
without breaking anything. Try replacing all
anonymous enums in include/core to see what happens.
This names SkCanvas::SaveLayerFlagsSet but leaves
SkCanvas::SaveLayerFlags as a uint32_t, to reduce
risk as compared to review.skia.org/123584.
There's also some chance that external linkage will
break if some client refers to anonymous enum in a way
that could require its address: see
https://stackoverflow.com/questions/22867654/enum-vs-constexpr-for-actual-static-constants-inside-classes
(This CL does not require definitions + declarations)
Brought bookmaker docs in line with this change.
This also tripped over missing code in bookmaker
handling constexpr so added that as well.
R=reed@google.com,bsalomon@google.com
Docs-Preview: https://skia.org/?cl=123920
Docs-Preview: https://skia.org/?cl=123584
Bug: skia:6898
Change-Id: I14a342edcfd59e139ef9e4501f562417c4c60391
Reviewed-on: https://skia-review.googlesource.com/123920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
SkColor.h uses #define liberally, and has many global symbols,
two things bookmaker hasn't seen in other includes.
Revised .h -> .bmh converter to work with SkColor.h as well
as updating how .bmh indices are built.
Generated SkColor_Reference.bmh for globals, and
SkColor4f_Reference.bmh for class.
Other than the existing comments, this doesn't update the
documentation or add new examples.
Docs-Preview: https://skia.org/?cl=118985TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I5978257ee0e51319823efbe8dfc467a08c99ffe0
Reviewed-on: https://skia-review.googlesource.com/118985
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
SK_IGNORE_TO_STRING is not defined anywhere.
The same effect can be had by using a modern
linker.
Removing it simplifies bookmaker and makes
our includes easier to understand.
R=robertphillips@google.comTBR=reed@google.com
Bug: skia:6898
Change-Id: Ib716f5ef1b42a7fbda0df43ece212d1b7c40289f
Reviewed-on: https://skia-review.googlesource.com/118963
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Check to see if a method is inside a struct or class
before increasing its indentation. Also, add missing
description.
Docs-Preview: https://skia.org/?cl=118381
Bug: skia:6898
Change-Id: I9402442a89dafc96d87bf69f157dcfa40cdf6e2b
Reviewed-on: https://skia-review.googlesource.com/118381
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
- More rigorous symbol identification creates additional
links, and finds spurious errors like unnecessary
parentheses.
- Fixed code to allow preprocessor directives in
#Code blocks (still more to do).
- Fixed examples waiting on fiddle updates.
- Make SkImageInfo officially documented (update in status.json).
- Fixed enum indentation.
Docs-Preview: https://skia.org/?cl=115656
Bug: skia:6898
Change-Id: Ifcf5cfd3f6c03b3b83155c898b2b035a2f3d443c
Reviewed-on: https://skia-review.googlesource.com/115656
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
fix a couple of fiddles with changed output
rewrite some SkSurface image makers
move towards replacing SkImageInfo.h
R=caryclark@google.com
Docs-Preview: https://skia.org/?cl=115163
Bug: skia:6898
Change-Id: Id9895b051cd457336c30250a69cf95359d1d34d7
Reviewed-on: https://skia-review.googlesource.com/115163
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
If a method in an include is marked deprecated, make sure that
the documentation is marked deprecated.
It's OK for the documentation to mark something deprecated that
is not marked as such in the includes since the documentation may
be ahead of the includes.
Fix a couple of mistakes found around deprecated methods.
Docs-Preview: https://skia.org/?cl=114184TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I2bb4c293d7bf28e5d12f9ae01b7be49ce48b9ee4
Reviewed-on: https://skia-review.googlesource.com/114184
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
bookmaker sent mdout errors to stdout, but did not return
failure, fooling skia-commit-bot into thinking that the
md files should be updated.
Continue to report all mdout errors in a file, but fail
once the errors are reported.
TBR=rmistry@google.com
Bug: skia:6898
Change-Id: Ic342dd9a6e4aeea29626b52efe7d2c4e53da155e
Reviewed-on: https://skia-review.googlesource.com/113701
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
some support for interfaces containing
template <typename x> class x
includeParser now correctly balances
bracket indentions and builds correct hierarchy.
Cross-check does not detect that the bmh definition
is missing the class; then includeWriter asserts
when the bmh class can't be found.
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: Ibb70667ed4a6f8e553eec3924b56dfde737b4383
Reviewed-on: https://skia-review.googlesource.com/113460
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
This adds the ability to define long phrases
in one place and refer to those phrases in
many places.
Bookmaker has new syntax to support phrase substitution.
When it encounters
#some_phrase_reference#
It substitutes the body of
#PhraseDef some_phrase_reference
text to substitute when encountering the phrase
##
The phrase label must start with a lowercase letter,
and be bracketed by single hash marks, without spaces
between the label and the hash marks.
Docs-Preview: https://skia.org/?cl=111224TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I12c57d916ccedbd86b421377d117399150ada72a
Reviewed-on: https://skia-review.googlesource.com/111224
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
move the #Line directive to make bookmaker happy
Docs-Preview: https://skia.org/?cl=108740
Bug: skia:6898
Change-Id: I8b993bab6b4f69cc266941e281a00a945f32f25e
Reviewed-on: https://skia-review.googlesource.com/108740
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Florin pointed out docs that used SkPoint where
SkIPoint was intended. This was caused by the
original documentation guessing that 'points'
referred to one and not the other.
For now, use IPoint explicitly in the documentation
to get around this.
Docs-Preview: https://skia.org/?cl=108569
Bug: skia:6898
Change-Id: I12bac1d4cf82a614bee98895f12e4f99add2dbd7
Reviewed-on: https://skia-review.googlesource.com/108569
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Recent changes to generate tables of methods
require more parsing to figure things like
indention params for structs.
Fix other stuff that got broken since the last
time all includes were generated.
TBR=caryclark@google.com
Bug: skia:6898
Change-Id: Icd6f5feb5324eb4e0feb307400aa53207109cb29
Reviewed-on: https://skia-review.googlesource.com/108182
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
generating replacement includes exposed
errors mostly dealing with globals like
SkAlphaType and members. Rewrite finding
and resolving links to hopefully make this
area more robust.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=107160
Bug: skia:6898
Change-Id: I9b8025160203d204286f3f6ca0cebd70da6253b4
Reviewed-on: https://skia-review.googlesource.com/107160
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
add self-check looking for #In markup on every method, pointing
to an existing #Subtopic to reference the method.
Docs-Preview: https://skia.org/?cl=104325
Bug: skia:6898
Change-Id: I749a25b9a43033ae68d193249b2c0b810dcf8fc8
Reviewed-on: https://skia-review.googlesource.com/104325
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
- mark the interfaces that use SkMask as deprecated
- add more autogenerated subtopics
- make subtopic names singular, avoiding collision with Skia names
- simplify #Deprecated and #Bug tags
- add "#Deprecated soon" to note things to be deprecated
- fix some spelling errors
- refresh web docs
- add self-check functionality to find methods outside subtopics
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=102150
Bug: skia:6898
Change-Id: I0e742a56d49dccd4409bb68eed9167c8ad7611ce
Reviewed-on: https://skia-review.googlesource.com/102150
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Replace manually entered summary tables with ones that are populated
and sorted by bookmaker. This introduces a slight regression for
anonymous enums but fixes a lot of bugs and omissions.
The format is
#Topic somethingTopical
#Populate
##
where somethingTopical is one of Subtopics, Constructors, Constants,
Classes_and_Structs, Members, Member_Functions, and Related_Functions.
Fix the bad formatting in SkCanvas reference. The #Error tag was
was corrupting the markdown table. Remove the tag and replace it
with #NoExample.
Next up: revise self-check to know about populated topics.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=102080
Bug: skia:6898
Change-Id: Idef5d1c14c740c18a81d6a5106182788dd2a09e1
Reviewed-on: https://skia-review.googlesource.com/102080
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
- make descriptions of table entries phrases instead of sentences;
lower case start, no ending period (not enforced, yet)
- add #Line markup to move one line descriptions to the #Method
body. Later, will generate tables like Member_Functions from this
- add #In markup to associate a #Method with a #Subtopic. Later, will
generate tables of related methods from this
- remove return type from operator overloads in tables
- add new colorTypes to examples that index into arrays of strings
to name them
Docs-Preview: https://skia.org/?cl=100422TBR=caryclark@google.com
Bug: skia:6898
Change-Id: I8558048866369f419f1944832b99c05da3fd52bb
Reviewed-on: https://skia-review.googlesource.com/100422
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Added global enum support. That exposed one
big hole in bookmaker: The topic overview
should not be in the class or struct if
the topic includes multiple objects, which
is the case for SkImageInfo and enums like
SkColorType.
This straightens that out, and then used that
knowledge to strengthen the topics in
SkRect as a test. Now SkRect has more
groups of methods, and can expose and link
to sets of methods with the same name.
This work also is getting ready for tightening
SeeAlso data, to be checked as part of the
bots' tasks soon.
Also, remove links from markup for lowercase
method names unless the reference has
trailing parentheses.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=98782
Bug: skia:6898
Change-Id: I35419c9789da17e272047bf7b9c95b1cf44bb7fe
Reviewed-on: https://skia-review.googlesource.com/98782
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
rather than segfault when running
bookmaker cross check, report
a parsable error.
In a separate CL, I'll add support
for global enums.
R=herb@google.com
Bug: skia:6898
Change-Id: I91c62df5470acbf5c0acf0c558d2d5d3bf48d40e
Reviewed-on: https://skia-review.googlesource.com/98682
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Add self-checking code that looks to see that overview is populated
and alphabetized. Eventually, this will self-check to see if
methods are collected into subtopics and have reciprocal 'see also'
data.
Standardize phrases so that they don't start with a capital or end
with a period.
Self-check is a work in progress, so it is not yet run by the
bookmaker bots. The self-check should run cleanly, however. To run
it:
./out/skia/bookmaker -b docs -k
The expected output is doc stats. Self-check errors such as missing
methods in the overview would be reported here if there are any.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=93621
Bug: skia:6898
Change-Id: I8f1f817a7b083b13138ee33d1aa090445e9304c6
Reviewed-on: https://skia-review.googlesource.com/93621
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
more image docs, still not done
add ability to comment out non-working examples easily
start work on additional self-checks
clean up use of this-> in docs
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=91720
Bug: skia:6898
Change-Id: I706ab8145290e53ab67d3f509ccf4e1225adb3c3
Reviewed-on: https://skia-review.googlesource.com/91720
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
streamline 'working as intended' output
notify when output changed
fix bug which appended output incorrectly to SkBitmap.h
fix bug that hid bad SkSurface.h from detection
Docs-Preview: https://skia.org/?cl=90162
Bug: skia:6898
Change-Id: I067cfe5bbad706345fb5cd540cdc3835ce22d822
Reviewed-on: https://skia-review.googlesource.com/90162
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
allow examples to work with colorspace
fix point array plural form
fix spacing after private message
add some SkImage documentation
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=90360
Bug: skia:6898
Change-Id: I045ee68e7dd9747ec5d40d95588bbc1594c45366
Reviewed-on: https://skia-review.googlesource.com/90360
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
image doc is still a work in progress.
Update online version to latest; updating
include header is still a ways off.
Remove SkPaint::flatten() example since
parameter is not publicly accessible.
Minor changes to fix typedef and std::function
references.
TBR=rmistry@google.com
Docs-Preview: https://skia.org/?cl=87120
Bug: skia:6898
Change-Id: I3553bc5fca97c5997aa61ea034b5ca10cb10df75
Reviewed-on: https://skia-review.googlesource.com/87120
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
crosscheck in bookmaker allows
discovery of multiple errors,
but fails to return that an
error occurred.
Fix SkSurface so it is up to date with includes.
Add include parameter name in SkSurface.
Allow longer parameter descriptions.
TBR=bsalomon@google.com,rmistry@google.com
Docs-Preview: https://skia.org/?cl=88041
Bug: skia:6898
Change-Id: I9daf83f7f6753b3d1dc996a76e4693b3b8d6798c
Reviewed-on: https://skia-review.googlesource.com/88041
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@google.com>
Identify volatile stdout from examples
to make site/user/api/catalog.htm the same from one run to
the next.
Remove a debugging printf from mdOut.cpp
Docs-Preview: https://skia.org/?cl=83941
Bug: skia:6898
Change-Id: I52c7527394e00934f57bb6c02ff33b422f4770ca
Reviewed-on: https://skia-review.googlesource.com/83941
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Verified that bookmaker running on Linux generates same
.md files as when it runs on Windows.
Fixed a directory separator bug.
Catalog has slightly different output because some
tests generate volatile output -- need to fix this
in general.
Docs-Preview: https://skia.org/?cl=83940
Bug: skia:6898
Change-Id: I3c56c372d155b1b14a1fbdf616fa79f420b78150
Reviewed-on: https://skia-review.googlesource.com/83940
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Add more examples and docs for SkImage; still a ways to go.
Fix bit-rotted examples.
Add typedef support.
Add json driver to pick files to work on; remove special-casing.
Fix unordered map traversal that made md output unreliable.
TBR=rmistry@google.com
Docs-Preview: https://skia.org/?cl=80060
Bug: skia:6898
Change-Id: Ib8eb9fdfa5a9db61c8332e657fa2e2f4b96a665f
Reviewed-on: https://skia-review.googlesource.com/80060
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Add support for more operator overloads.
Add SkSurface, SkPoint, SkIPoint, SkIPoint16 docs.
(SkImage doc skeleton added, but not really started.)
Force recompile all examples.
Docs-Preview: https://skia.org/?cl=67726
Bug: skia:6898
Change-Id: If9e2d23f79d5db64146dd22588f5cac970614b8a
Reviewed-on: https://skia-review.googlesource.com/67726
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
This also updates one fiddle example which used SkTypeface::kBold, which
is now private.
Change-Id: I799b64bfaa377d02f0a045d2f077410d4f38413d
Reviewed-on: https://skia-review.googlesource.com/68902
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Also minor changes to earlier docs.
Many small changes to improve indentation in generated includes.
Added support for matrix math illustrations.
Docs-Preview: https://skia.org/?cl=58500
Bug: skia:6898
Change-Id: I7da58ad55f82d7fd41d19288beb2cd71730fb01f
Reviewed-on: https://skia-review.googlesource.com/58500
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.
Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Also add a presubmit so they don't get added to source code.
Change-Id: I6a85c6a934b1068a63646a0dcc0d3a08baa96ced
Reviewed-on: https://skia-review.googlesource.com/57110
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
All functions should have descriptions, examples, cross-references.
References and spelling have been checked.
More work to do creating and organizing topics.
Docs-Preview: https://skia.org/?cl=56140
Tbr: caryclark@google.com
Bug: skia:6898
Change-Id: I9d1e55d04ab64874c33cac8b91534aa192c2f545
Reviewed-on: https://skia-review.googlesource.com/56140
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
rearrange class descriptions to make them
appear consistently inside the #Class
declaration in the .bmh files.
Look for the descriptions there and
regenerate the .md files.
Docs-Preview: https://skia.org/?cl=46523TBR=caryclark@google.com
Bug: skia: 6898
Change-Id: I00a176428725ef27667d3f23d76d6b7ff0cfced1
Reviewed-on: https://skia-review.googlesource.com/46523
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>