Commit Graph

30 Commits

Author SHA1 Message Date
Brian Osman
77326adc07 Remove isOpaque parameter from CanvasKit SkRuntimeEffect APIs
Bug: skia:12643
Change-Id: I285d42c908c75532b78c9b80da7b6145e1b47fe7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506458
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-10 17:15:13 +00:00
Brian Osman
6a312e79e9 Update SkSL docs (isOpaque, folding)
- Remove the isOpaque parameter from all makeShader calls
- Add some folding to emphasize important parts of fiddles

Bug: skia:12643
Change-Id: Iaae5d61b63b409a8754b5144dc2baf5927a14848
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506316
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-09 16:31:38 +00:00
Brian Osman
5941929042 Add SkSL color management docs
Explains several different features for:
- Uniforms
- Raw image shaders
- Color transform intrinsics

Bug: skia:10479
Change-Id: I9254d30283e74f039eb1490636efec1ddd125aa2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/492656
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-01-10 14:34:46 +00:00
Ravi Mistry
fc5fc658c8 Update missed fiddle-embed -> fiddle-embed-sk reference
Bug: skia:12788
Change-Id: Idf9918280a0ca9c5fd49230b84198838f43403ad
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/492401
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2022-01-07 16:21:55 +00:00
Ravi Mistry
2b12f2dddb fiddle-embed -> fiddle-embed-sk
Bug: skia:12788
No-Try: true
Change-Id: If4cf2f9c4b1056ff63fdc704def494f9f0933145
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/491817
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2022-01-07 15:23:15 +00:00
Brian Osman
426f7b5ad6 More site cleanup
- Updated the site's copy of release notes
- Removed Flutter/Fuchsia information - it was mostly out of date and
  incorrect (we've had a Flutter autoroller for years).
- Removed "how to apply a patch" - it still referred to Reitveld, and
  Gerrit provides plenty of guidance on this from the web UI itself.
- Fixed some broken link formatting
- The embedded 3D cube demo worked, but the linked copy on jsfiddle had
  a call to an (unnecessary) deleted API. Fixed that.
- One of the particle examples linked to the wrong effect on
  particles.skia.org
- Converted a static 'code + png' example (text drop shadow) to a
  fiddle-embed, which is prettier and more functional.

Change-Id: I530dd9fe19288d969fef68feb2c9002c8378e0df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/491818
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2022-01-06 16:05:15 +00:00
Kevin Lubick
c10950a60f [docs] Fix skottie.md
This adjusts the alignment as well as the loading of canvaskit
and the inline element.

Change-Id: I8adf28e08a714ac466b751183a3dd9c3cc5de1a6
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/488523
Reviewed-by: Ravi Mistry <rmistry@google.com>
2021-12-23 18:10:48 +00:00
Brian Osman
8893fe4772 Fix jsfiddle link for 3D cube demo
Bug: skia:12714
Change-Id: I1babde07ca8f22376cfd5c02c5412c551d5b5669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/480116
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-12-06 13:15:15 +00:00
Brian Osman
deb9386be1 Fix SkSL doc examples that used reserved identifiers
Change-Id: I36e3742c5f0b744da0342648951ddb7fdce82aba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/468377
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2021-11-05 18:06:46 +00:00
Brian Osman
6358289210 Fix particles demo page
Was using an old (unnecessary) CK construct that no longer exists

Change-Id: Ib56795d5588586f6da07e0c90e36c3aee1fbbb18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/456645
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-10-07 12:55:18 +00:00
Brian Osman
b9982f4928 Update SkSL premul vs. unpremul documentation
We no longer clamp colors to premul. Updated the examples and
explanation.

Bug: skia:12483
Change-Id: Idb0eec3ac1db5f81c657104093fa8a647529209a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453137
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-09-27 15:57:20 +00:00
Eric Boren
04fe267ab9 Fix some master -> main references in docs
Bug: skia:12478
Change-Id: I4e2bc1eb441c19d7b4cf2bcea65b852f7f0aa59b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453136
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2021-09-27 14:52:24 +00:00
Joe Gregorio
29399939c8 [docsy] Lean on Hugo to generate the ToC for each page.
Instead of manually maintaining them, which is error prone.

Change-Id: If78a564e4afe238d195b952fea276154b2e12b06
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449917
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2021-09-17 17:47:52 +00:00
Eric Boren
14cc21fd99 [sk] Update asset download references to use SK
Change-Id: If3e838f22f1b99fd7a3b1c6bca0affd39f5573b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/449843
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2021-09-17 16:55:53 +00:00
Brian Osman
56273c9248 Update SkSL docs slightly
- Use .eval() in all example fiddles
- Add some more explanation of how the parts of a draw/paint contribute
  to the GPU fragment shader.

Bug: skia:12302
Change-Id: Ib69b9af39368c980e1aa9206af585f26498d083e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/445640
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 19:09:52 +00:00
Brian Osman
cbfa34a58c Convert internal SkSL to use .eval()
Also update RELEASE_NOTES to describe new syntax.

Change-Id: I2666551b98f80b61ae3a48c92a9e306cdc7242b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/444735
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-09-03 15:54:54 +00:00
Brian Osman
293497e77f Convert internal sample() calls to shade/filter/blend
Bug: skia:12302
Change-Id: I8cf958acf9214d0de903a4097647afd74f2a659e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/441541
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-08-24 21:03:44 +00:00
Heather Miller
44cd93f4fa update release notes
Change-Id: Ida17b9d3da4d3a6489f62d2959379747a671fbab
Docs-Preview: https://skia.org/?cl=428982
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428982
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
2021-07-16 16:03:35 +00:00
Brian Osman
7cf34848da Update SkSL fiddles embedded in user documentation
https://skia.org/docs/user/sksl/?cl=428878

Bug: skia:12213
Change-Id: Id85edabd0977942bd7bbd0ab3f0d3ecd85340411
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428878
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-07-15 15:12:31 +00:00
Kevin Lubick
8e89f60c49 [canvaskit] Update docs to account for API changes
canvas.flush() was removed. This updates all examples to
use surface.requestAnimationFrame(), which is cleaner.

Change-Id: I79fa308dc321865318b7f5d4723f3f803c0b071a
No-Try: true
Docs-Preview: https://skia.org/?cl=414856
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414856
Reviewed-by: Herb Derby <herb@google.com>
2021-06-02 14:15:18 +00:00
Heather Miller
0ea0e75a3d Update release notes for m92 cut, m93 begin
Change-Id: I216fa16d6dfd57214def9099cb3fa1b5cb281f23
Docs-Preview: https://skia.org/?cl=411299
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411299
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2021-05-21 18:18:03 +00:00
Ravi Mistry
e5be65e998 Update references to master branch
Change-Id: I1bfd1b655af6cdfbd64452b1e594a276425095fe
Bug: skia:11987
Docs-Preview: https://skia.org/?cl=410790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410790
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-05-21 15:18:16 +00:00
Brian Osman
e5877456ef Restore cube demo to canvaskit demo page
Lighting isn't quite right, but this is far better than nothing.

Change-Id: I5ad663be01554da68d878a383855cd719a9952f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399338
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-21 21:55:27 +00:00
Brian Osman
e37660b43c Use SkRuntimeEffect::MakeForShader in CanvasKit
The old factory is deprecated. The new factory does stricter checking on
the signature of main and calls to sample - verifying that the SkSL is
valid as an SkShader (vs SkColorFilter) at effect creation time.

Bug: skia:11813
Change-Id: I8d70f81b5c3fa78b05add1b591caf1d26dd70402
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399077
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-21 17:44:12 +00:00
Brian Osman
8f1dff6a9e Remove layout(marker) from runtime effect SkSL
This is another strange, experimental feature that clutters the
implementation and isn't used by anyone (to my knowledge).

Change-Id: I538b7eca0cd28aab32f4739b23459731ade9105e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398226
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-19 18:48:45 +00:00
Heather Miller
5571865673 update release notes for M91 branch
Change-Id: I5bddb5aa3543953cf5fb6090a247359ab69a239c
Docs-Preview: https://skia.org/docs/user/release/release_notes?cl=395097
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/395097
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
2021-04-09 19:31:57 +00:00
Brian Osman
0351d5af88 Add user docs about Skia coordinate spaces
Includes a general explanation of device vs. local, how shaders don't
move with geometry, and how to use canvas transforms. Also shows
localMatrix on an SkShader. Finally, links to that from the SkSL page,
and adds SkSL-specific notes about coordinates.

Bug: skia:11763
Change-Id: I31462aff66ff8514392098b972a10e7c96e4f254
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393516
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-04-09 13:50:19 +00:00
Joe Gregorio
e296c56735 [docs] Fix all 404s.
Change-Id: I1b89db473582f9fcc4d87436a590ee36e869fe45
No-Try: true
Docs-Preview: https://skia.org/docs/user/build?cl=392717
Docs-Preview: https://skia.org/docs/dev/contrib/?cl=392717
Docs-Preview: https://skia.org/docs/dev/gardening/?cl=392717
Docs-Preview: https://skia.org/docs/user/tips?cl=392717
Docs-Preview: https://skia.org/docs/dev/tools/debugger?cl=392717
Docs-Preview: https://skia.org/docs/user/modules/pathkit?cl=392717
Docs-Preview: https://skia.org/docs/dev/testing/fuzz?cl=392717
Docs-Preview: https://skia.org/docs/dev/testing/ios?cl=392717
Docs-Preview: https://skia.org/docs/roles?cl=392717
Docs-Preview: https://skia.org/docs/user/api/?cl=392717
Docs-Preview: https://skia.org/docs/dev/testing/swarmingbots?cl=392717
Docs-Preview: https://skia.org/docs/dev/chrome/changes?cl=392717
Docs-Preview: https://skia.org/docs/user/download?cl=392717
Docs-Preview: https://skia.org/docs/dev/flutter/?cl=392717
Docs-Preview: https://skia.org/docs/user/modules/quickstart?cl=392717
Docs-Preview: https://skia.org/docs/user/api/skcanvas_creation?cl=392717
Docs-Preview: https://skia.org/docs/user/sample/viewer?cl=392717
Docs-Preview: https://skia.org/docs/dev/design/pdftheory?cl=392717
Docs-Preview: https://skia.org/docs/user/api/SkBlendMode_Overview?cl=392717
Docs-Preview: https://skia.org/docs/user/api/skcanvas_overview?cl=392717
Docs-Preview: https://skia.org/docs/?cl=392717
Docs-Preview: https://skia.org/docs/dev/contrib/submit?cl=392717
Docs-Preview: https://skia.org/docs/user/api/SkPath_Overview?cl=392717
Docs-Preview: https://skia.org/docs/user/modules/skottie?cl=392717
Docs-Preview: https://skia.org/docs/user/modules/canvaskit?cl=392717
Fixed: skia:404
Docs-Preview: https://skia.org/docs/dev/tools/calendar?cl=392717
Docs-Preview: https://skia.org/docs/dev/gardening/android?cl=392717
Docs-Preview: https://skia.org/docs/dev/contrib/style?cl=392717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392717
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2021-04-05 16:20:10 +00:00
Joe Gregorio
9601185bb6 [docs] Add back in all images and fix broken image links.
Change-Id: I0ffd838880746dbfe534ea615277fc24cd26b7ec
No-Try: true
Docs-Preview: https://skia.org/docs/dev/design/conical/corollary2.3.3?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Digests?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Status?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Cluster?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Perf?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/corollary2.3.2?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/lemma4?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/IssueHighlight?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/lemma3.1?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/tracing?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/BlameView?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/corollary2.2.2?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/download?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Isolate?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Search?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/end?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/image?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Grid?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/corollary2.2.1?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/debugger?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/pdftheory?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/resources?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/playcommands?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/DotDiagram?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Ignores?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/onlinedebugger?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/crosshair?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/frameplayback?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/corollary2.3.1?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/buttons?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/ClusterConfig?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/lemma3.2?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/skiaperf?cl=392736
Docs-Preview: https://skia.org/docs/dev/contrib/SuggestedReviewers?cl=392736
Docs-Preview: https://skia.org/docs/user/modules/PathKit_effects?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/Regression?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/ByTest?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/settings?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/conical/lemma1?cl=392736
Docs-Preview: https://skia.org/docs/dev/design/PdfLogicalDocumentStructure?cl=392736
Docs-Preview: https://skia.org/docs/dev/testing/skiagold?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/expand?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/tracing_load?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/layers?cl=392736
Docs-Preview: https://skia.org/docs/dev/tools/gpuop?cl=392736
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392736
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-04-05 13:20:45 +00:00
Joe Gregorio
10d45b867f [docysserver] Move to the Hugo/Docsy set of files as the primary documentation.
Bug: skia:11799
Change-Id: Ic9e9bc6a91cf1a7c9166ca1eae4aec6b00eb5e2a
Docs-Preview: https://skia.org/?cl=391436
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391436
Reviewed-by: Heather Miller <hcm@google.com>
2021-03-31 19:16:09 +00:00