diff options
author | Cary Clark <caryclark@skia.org> | 2017-12-12 11:22:38 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-12 16:44:29 +0000 |
commit | ca3ebcd724b4bc5ba8c79ef6471288dc09349af7 (patch) | |
tree | 869bc5cda8908e4af2eaf95326364f1ed795a1ad /docs | |
parent | 929253d3986e00900857709da314c291804fafad (diff) |
fix fractured fiddles
Latest run of Ravi's bot found a couple
of new fiddle failures. Fix them.
Yay, tools!
Docs-Preview: https://skia.org/?cl=83944
Bug: skia:6898
Change-Id: I98ecef6b034363dfea88bcc9c710fb3017fc1c21
Reviewed-on: https://skia-review.googlesource.com/83944
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/SkCanvas_Reference.bmh | 24 | ||||
-rw-r--r-- | docs/usingBookmaker.bmh | 40 |
2 files changed, 51 insertions, 13 deletions
diff --git a/docs/SkCanvas_Reference.bmh b/docs/SkCanvas_Reference.bmh index 8979b87581..2f08ca0a18 100644 --- a/docs/SkCanvas_Reference.bmh +++ b/docs/SkCanvas_Reference.bmh @@ -4874,13 +4874,14 @@ void draw(SkCanvas* canvas) { } const int xDivs[] = { center.fLeft, center.fRight }; const int yDivs[] = { center.fTop, center.fBottom }; - SkCanvas::Lattice::Flags flags[3][3]; - memset(flags, 0, sizeof(flags)); - flags[1][1] = SkCanvas::Lattice::kTransparent_Flags; - SkCanvas::Lattice lattice = { xDivs, yDivs, flags[0], SK_ARRAY_COUNT(xDivs), - SK_ARRAY_COUNT(yDivs), nullptr }; + SkCanvas::Lattice::RectType fillTypes[3][3]; + memset(fillTypes, 0, sizeof(fillTypes)); + fillTypes[1][1] = SkCanvas::Lattice::kTransparent; + SkColor dummy[9]; // temporary pending bug fix + SkCanvas::Lattice lattice = { xDivs, yDivs, fillTypes[0], SK_ARRAY_COUNT(xDivs), + SK_ARRAY_COUNT(yDivs), nullptr, dummy }; for (auto dest: { 20, 30, 40, 60, 90 } ) { - canvas->drawBitmapLattice(bitmap, lattice , SkRect::MakeWH(dest, 110 - dest), nullptr); + canvas->drawBitmapLattice(bitmap, lattice, SkRect::MakeWH(dest, 110 - dest), nullptr); canvas->translate(dest + 4, 0); } } @@ -4949,11 +4950,12 @@ void draw(SkCanvas* canvas) { } const int xDivs[] = { center.fLeft, center.fRight }; const int yDivs[] = { center.fTop, center.fBottom }; - SkCanvas::Lattice::Flags flags[3][3]; - memset(flags, 0, sizeof(flags)); - flags[1][1] = SkCanvas::Lattice::kTransparent_Flags; - SkCanvas::Lattice lattice = { xDivs, yDivs, flags[0], SK_ARRAY_COUNT(xDivs), - SK_ARRAY_COUNT(yDivs), nullptr }; + SkCanvas::Lattice::RectType fillTypes[3][3]; + memset(fillTypes, 0, sizeof(fillTypes)); + fillTypes[1][1] = SkCanvas::Lattice::kTransparent; + SkColor dummy[9]; // temporary pending bug fix + SkCanvas::Lattice lattice = { xDivs, yDivs, fillTypes[0], SK_ARRAY_COUNT(xDivs), + SK_ARRAY_COUNT(yDivs), nullptr, dummy }; sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap); SkImage* imagePtr = image.get(); for (auto dest: { 20, 30, 40, 60, 90 } ) { diff --git a/docs/usingBookmaker.bmh b/docs/usingBookmaker.bmh index f0f79d213e..411fd7f379 100644 --- a/docs/usingBookmaker.bmh +++ b/docs/usingBookmaker.bmh @@ -64,6 +64,20 @@ All structs, classes, enums, their members and methods, functions, and so on, require descriptions. Most also require examples. All methods and functions should include examples if practical. +It's difficult to think of a meaningful example for class destructors. +In cases like these, change the placeholder: + +###$ +$Code +#Example +$$ + +to: + +$Code +#NoExample +$$ +$$$# Descriptions start with an active verb. Descriptions are complete, punctuated sentences unless they describe parameters or return values. Parameters and @@ -71,8 +85,8 @@ returned values are described by phrases that start lower case and do not include trailing punctuation. Descriptions are not self-referential; they do not include the thing they -describe. Descriptions may contain upper case references to definitions -but otherwise should be free of jargon. +describe. Descriptions may contain upper case or camel case references to +definitions but otherwise should be free of jargon. Descriptions may contain code and formulas, each bracketed by markup. @@ -88,6 +102,10 @@ an example, and any cross references. Each method must contain either one or more examples or markup indicating that there is no example. +After editing is complete, searching for "incomplete" should fail, +assuming "incomplete" is not the perfect word to use in a description or +example! + ## Generate fiddle.json from all examples, including the ones you just wrote. @@ -132,6 +150,24 @@ $ ./out/dir/bookmaker -p -b docs -i include/core/SkXXX.h to write the updated SkXXX.h to the current directory. +Once adding the file is complete, add the file to status.json in the +Completed section. You may add it to the InProgress section during +development, or leave status.json unchanged. + +If the new file has been added to status.json, you can run +any of the above commands with -a docs/status.json in place of +-b docs or -i includes. + +Complete rebuilding of all bookmaker output looks like: + +#Code + ./out/skia/bookmaker.exe -a docs/status.json -e fiddle.json + ~/go/bin/fiddlecli.exe --input fiddle.json --output fiddleout.json + ./out/skia/bookmaker.exe -a docs/status.json -f fiddleout.json -r site/user/api -c + ./out/skia/bookmaker.exe -a docs/status.json -x + ./out/skia/bookmaker.exe -a docs/status.json -p +## + #Subtopic Bugs Bookmaker bugs are tracked |