Building CanvasKit uses very similar logic to PathKit, so there
was a fair amount of copy/paste/customize.
Fixes the name of skia.js/wasm -> canvaskit.js/wasm and
adds a package.json to formally track versions.
Also move PathKit helper scripts to align better.
Docs-Preview: https://skia.org/?cl=160463
Bug: skia:
Change-Id: Ie75b30592dcc4d520dca41f6f5579006aaa8849b
Reviewed-on: https://skia-review.googlesource.com/c/160463
Reviewed-by: Eric Boren <borenet@google.com>
First cut at splitting bookmaker documentation into reference
and overview. Reference starts with a hyperlinked index,
generated from a public include.
This moves towards typing once, minimizing the information
duplicated in the .h file and the .bmh file.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=154630
Change-Id: I836622db9b1786bd28c0bce2536cd3caef6e5a32
Reviewed-on: https://skia-review.googlesource.com/c/154630
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Updates example to use text (and be more mobile friendly).
Also make the compile step a bit nicer and remove SKOTTIE_HACK.
Docs-Preview: https://skia.org/?cl=158664
Bug: skia:
Change-Id: I4c465482058ad7d359729a492e29205c07f3933e
Reviewed-on: https://skia-review.googlesource.com/c/158664
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Use drawTextRSXform in place of deprecated SkDrawTextOnPath
in example. I'm curious if there is a more elegant way to
illustrate where round rects start, but this is all I've
come up with.
R=reed@google.com,fmalita@google.com
NOTRY=true
Docs-Preview: https://skia.org/?cl=158444
Bug: skia:
Change-Id: I0fc02078e6425afabb5dc71f458435d606c82e77
Reviewed-on: https://skia-review.googlesource.com/158444
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This adds one more skottie example and spruces up
the demos a bit (including making the star only
respond when you hold down the mouse)
No-Try: true
Docs-Preview: https://skia.org/?cl=156141
Bug: skia:
Change-Id: Ib577d6c06bd9784f4566d506150c451beadf1f1c
Reviewed-on: https://skia-review.googlesource.com/156141
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
add docs for new SkImage methods
Also, the tool slightly adjusted the spacing
for the include comments, and fixed a few references.
TBR=bsalomon@google.com
Docs-Preview: https://skia.org/?cl=155160
Bug: skia:
Change-Id: I7977ca3048bd7d0c23f84db19f62f7accdcd77bb
Reviewed-on: https://skia-review.googlesource.com/155160
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
match docs for SkImage::MakeFromAHardwareBuffer
with include.
TBR=stani@google.com
NOTRY=true
Docs-Preview: https://skia.org/?cl=154503
Bug: skia:6898
Change-Id: Ia0c6d12c1f0d131b3d46e9c1168012613a96d81b
Reviewed-on: https://skia-review.googlesource.com/154503
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Bookmaker delimits formulas and equations to allow
representing variables and symbols without tripping
up reference lookup, spell checking, and comment
generation.
Before, formulas were represented with:
some text
#Formula
(x + y, 0)
##
, and more text
This made it difficult to know when spacing should
be preserved before and after the formula. Now,
formulas are represented with:
some text #Formula # (x + y, 0) ##, and more text
The presence or absence of a space between ## and ,
is now significant (before it was not).
Also, formulas are bracketed by <code> in markdown
generation, so that variables stand out better.
See:
https://skia.org/user/api/SkBlendMode_Reference?cl=152781#Dst_Out
for an example.
Also fixed 100 column offenders and added a code
check to identify them. For the moment, 100 column
offenders are outed with SkDebugf but their presence
does not cause bookmaker to fail.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152781
Bug: skia:6898
Change-Id: If92a65a234f5d616bf4485984a8d219a6f04821a
Reviewed-on: https://skia-review.googlesource.com/152781
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
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>
Failure to fully parse subclass destructor
caused bookmaker to drop everything that
followed. Fix it, and look for subclass
constructors more thoroughly.
Fixed ints that should have been size_t
that broke the build the first time. Its
weird that the trybot CL didn't catch this.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152666
Bug: skia:6898
Change-Id: Id2ec0e96e71c371c97f344f9e116be211fd220bc
Reviewed-on: https://skia-review.googlesource.com/152666
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Failure to fully parse subclass destructor
caused bookmaker to drop everything that
followed. Fix it, and look for subclass
constructors more thoroughly.
TBR=caryclark@google.com
Docs-Preview: https://skia.org/?cl=152500
Bug: skia:6898
Change-Id: I623b9d5ea3f633e5e96276c2c9edc608f7b8c008
Reviewed-on: https://skia-review.googlesource.com/152500
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Clean up the documentation a bit.
Clean up old bugs.
Fix deprecated and experimental wording.
TBR=caryclark@skia.org
Docs-Preview: https://skia.org/?cl=151361
Bug: skia:
Change-Id: I6b2120069b3299fc9d1a63c13bb2bdbe5cd3b236
Reviewed-on: https://skia-review.googlesource.com/151361
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Cary Clark <caryclark@google.com>
Switch back to using unpkg.com since it's actually a CDN
not a GCS bucket just pretending (lower latency, better
compression, etc).
Also loads consistently since https://skia-review.googlesource.com/c/buildbot/+/152020
landed.
No-Try: true
Docs-Preview: https://skia.org/?cl=151826
Bug: skia:
Change-Id: I9a2a8d71ebc87e44a85bf7ec40d04a0279a97ff1
Reviewed-on: https://skia-review.googlesource.com/151826
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Add SkPaint::setColor4f and getColor4f.
R=brianosman@google.com
NOTRY=true
Docs-Preview: https://skia.org/?cl=151761
Bug: skia:6898
Change-Id: If7966a4e98318a145870f3d17bd6dbc1b3cf9439
Reviewed-on: https://skia-review.googlesource.com/151761
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
No-Try: true
Docs-Preview: https://skia.org/?cl=151663
Bug: skia:
Change-Id: I7c535c6c13251210d9842f1ddbb7425dd222a423
Reviewed-on: https://skia-review.googlesource.com/151663
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This reverts commit 434b80f82f.
Reason for revert: Reverting 4f CL.
Original change's description:
> add color4f to docs
>
> Add SkPaint::setColor4f and getColor4f. Another pass will
> be required later once fiddle updates itself.
>
> Also add checks to bookmaker so it doesn't write status
> if generated files are unchanged; and deletes temporary
> files in working directory.
>
> R=brianosman@google.com
>
> Docs-Preview: https://skia.org/?cl=151365
> Bug: skia:6898
> Change-Id: I8059641f19017a86fc4b63ebd9ff784716365967
> Reviewed-on: https://skia-review.googlesource.com/151365
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: Cary Clark <caryclark@skia.org>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,caryclark@skia.org
Change-Id: Ice33fe50105959f104b3907a07eb3e8c51641ec2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6898
Reviewed-on: https://skia-review.googlesource.com/151543
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit b84576af0a.
Reason for revert: Need to revert original CL.
Original change's description:
> enable color4f doc examples
>
> fiddle has picked up the SkPaint::(get)(set)Color4f
> include change, so the doc examples are ready to
> check in.
>
> NOTRY=true
> R=brianosman@google.com
>
> Docs-Preview: https://skia.org/?cl=151370
> Bug: skia:6898
> Change-Id: I2c7ad3ce892ea6c8fde524df8e48a3c5713e2ba9
> Reviewed-on: https://skia-review.googlesource.com/151370
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Auto-Submit: Cary Clark <caryclark@skia.org>
TBR=brianosman@google.com,caryclark@skia.org
Change-Id: Iec47490505b532eb496f0eab8de9678fb5b7dcbf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6898
Reviewed-on: https://skia-review.googlesource.com/151542
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
fiddle has picked up the SkPaint::(get)(set)Color4f
include change, so the doc examples are ready to
check in.
NOTRY=true
R=brianosman@google.com
Docs-Preview: https://skia.org/?cl=151370
Bug: skia:6898
Change-Id: I2c7ad3ce892ea6c8fde524df8e48a3c5713e2ba9
Reviewed-on: https://skia-review.googlesource.com/151370
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Add SkPaint::setColor4f and getColor4f. Another pass will
be required later once fiddle updates itself.
Also add checks to bookmaker so it doesn't write status
if generated files are unchanged; and deletes temporary
files in working directory.
R=brianosman@google.com
Docs-Preview: https://skia.org/?cl=151365
Bug: skia:6898
Change-Id: I8059641f19017a86fc4b63ebd9ff784716365967
Reviewed-on: https://skia-review.googlesource.com/151365
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Brian Osman <brianosman@google.com>
On the demo page, we use the skia-cdn bucket to hopefully
have better performance than unpkg.
Additionally, on the demo page, we default to using the
WASM version if supported by the browser.
Docs-Preview: https://skia.org/?cl=150904
Bug: skia:8216
Change-Id: I901016e95b8d66803053680691aac4d314821d18
Reviewed-on: https://skia-review.googlesource.com/150904
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Change bookmaker to omit files written with unchanged
values. Temporary copies of fiddleout.json and catalog.htm
are written, and if the same as the existing copies, are
silently deleted.
Update stdout from examples in SkColor4f_Reference that
have changed to keep up with the latest checkin.
TBR=brianosman@google.com
Docs-Preview: https://skia.org/?cl=150146
Bug: skia:6898
Change-Id: I14e326bdd53baec92853d265edbe160c84583381
Reviewed-on: https://skia-review.googlesource.com/150146
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
This reverts commit 8ae7c90faf.
Reason for revert: Chrome roll
Original change's description:
> Remove old ICC parser, A2B SkColorSpace, SkGammas, etc...
>
> Docs-Preview: https://skia.org/?cl=148807
> Change-Id: I2d77f6543e390c4948d57242a518af77443f0165
> Reviewed-on: https://skia-review.googlesource.com/148807
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,brianosman@google.com,reed@google.com
Change-Id: I5821591b22e395327ec0cd29ec18569bf7f61859
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/150142
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Remove documentation, see also references, and examples
that rely on SkCanvas::drawTextOnPath(HV).
Move example that uses SkDrawTextOnPath into illustrations.
TBR=reed@google.com
Docs-Preview: https://skia.org/?cl=150020
Bug: skia:6898
Change-Id: I1d92f258b75a8a10a6aa89ebf9380871ba7ecac5
Reviewed-on: https://skia-review.googlesource.com/150020
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Breaking Changes (should be minor, as it's mostly just things
for testing):
- PathKit.ApplyPathOp should have returned a new SkPath, but didn't.
It now does and is named "MakeFromOp", which makes the convention of
"Have 'make' in name, needs delete" more consistent.
- PathKit.FromCmds(arr) now only needs to take the JS Array and
will handle the TypedArrays under the hood. If clients want to deal
with TypedArrays themselves, they can use _FromCmds(ptr, len) directly.
- PathKit.MakeLTRBRect is now just PathKit.LTRBRect. The thing
returned is a normal JS Object and doesn't need delete().
As per custom with v0 apps, we are updating the minor version
to v0.3.0 to account for breaking changes.
Docs-Preview: https://skia.org/?cl=147960
Bug: skia:8216
Change-Id: Ia3626e69f3e97698fc62a6aee876af005e29ffca
Reviewed-on: https://skia-review.googlesource.com/147960
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
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>