Change-Id: Ic53dc7ecab1b44761fe06e6b528864d24cc5fa58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363940
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The equivalent functionality is available in
include/effects/SkImageFilters.h via SkImageFilters::MatrixTransform.
Bug: skia:11230
Change-Id: I77b78d508d653a32c913a7599f1004ab634e3e6d
Docs-Preview: https://skia.org/?cl=361497
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361497
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This enforces an even stricter version of the rules from GLSL ES 1.0
Appendix A, Section 5. Essentially, indices (to arrays, vectors,
matrices) must be made of literals, loop indices, and expressions made
of those two.
Bug: skia:10837
Bug: skia:11096
Change-Id: I437a5ed64da58e24d5991ddbde68859f5214e98b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354665
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Also fix a crash if you try to play an effect that has never compiled
correctly. (After the first compile, the arrays were always large enough
to set "dt" -- this code is all going to be reworked soon for SkVM, but
I hit this while diagnosing the type coercion error).
Change-Id: I5bfab539c7304bde2da36b0b0604991d5b5b303a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/354660
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
I'm going to remove this feature to simplify migration to skvm.
fireworks was updated to work without it. raincloud is fairly complex,
and not that attractive, so it's just being deleted.
Change-Id: Id2d5cd490baa7bae627002f41edf7522c8bdfcd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353076
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This was unnecessary (closed-form unit-disc picking is simpler), and
these loops don't meet the strict ES2 standards that we'll be applying
to the interpreter soon.
Bug: skia:11095
Change-Id: Ic2617c2807fe49d57ff8e4d57d70b9ed1f015916
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348895
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
uint (and bitwise operations) aren't supported by our minimum spec, and
they're going to be removed from public SkSL. For now, convert the
random generator to a good-enough chaotic sequence of high-frequency
sine waves.
If/when the interpreter (and particles) are converted to the newer skvm
backend, it will be straightforward to support custom intrinsics that
emit skvm instructions directly into the builder, and re-introduce a
better integer-based PRNG, without requiring SkSL language support.
Bug: skia:11093
Change-Id: I885b15a51a9e5c12b4274b5938d8deb77219d41b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/347036
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The 'flags' field is going away soon (per public SkSL minimum spec), and
the only use of that feature was for this one example. The alternative
is simpler to understand, too.
Bug: skia:11093
Change-Id: I18a85bd48316301edc44c691fbe20f93da243e2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346776
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
I've landed some CLs that should make it easier to launch apps on Xcode,
plus it looks like the latest GN has also added some fixes.
Change-Id: Ifaf051020dff7ecad7091c854b8b42fc7f475afa
No-Try: true
Docs-Preview: https://skia.org/?cl=335871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335871
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
The previous behavior leaked Skia-internal concepts into public SkSL.
Users coming from GLSL will expect that bindable/sampleable objects are
uniform (just like texture2D). This keeps the old support around (and
tested), but updates all of our examples to use 'uniform'.
Bug: skia:10679
Change-Id: I0c98162f5e21dad7014d9778ceb26143d2f6030e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332376
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This also links the main canvaskit landing page to the quickstart
and both pages to the Typescript types and documentation.
Bug: skia:10717
Change-Id: I843639651aa04e48bb13f995c15e4ee18fb348bd
No-Try: true
Docs-Preview: https://skia.org/?cl=323889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323889
Reviewed-by: Nathaniel Nifong <nifong@google.com>
This is a massive breaking change for all existing users of CanvasKit.
It will be (one of the only) changes in 0.19.0 to make the transition
easier.
Suggested reviewing order:
- index.d.ts (to see type changes). Notice SkPicture still has Sk
prefix, but no other types do (this felt "right" since Sk is
part of the name of the type, but I can be swayed on this).
- canvaskit-wasm-tests.ts
- tests/*.spec.js
- interface.js and helper.js
- html examples
- markdown files
Change-Id: I3b3d3815df2078f986893df3c70101d6248c117d
Docs-Preview: https://skia.org/?cl=322617
Bug: skia:10717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322617
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
These are no longer needed now that we've migrated away.
Change-Id: Id308af7d40ffe0d539a3c6fd201220d145080928
Docs-Preview: https://skia.org/?cl=317281
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Android,Canary-G3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317281
Commit-Queue: Adlai Holler <adlai@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
There is no more 'inout half4 color'. Effects return their output color.
If an effect wants the input color, it must use the (already existing)
approach of sampling a nullptr input shader.
The change is guarded for Chromium (so we can update their runtime color
filters in skia_renderer.cc).
For the GPU backend, FPs can now override usesExplicitReturn to indicate
that their emitCode will generate a return statement. If that's true,
then writeProcessorFunction doesn't inject the automatic return of the
output color, and emitFragProc will *always* wrap that FP in a helper
function, even as a top-level FP. GrSkSLFP opts in to this behavior, so
that the user-supplied return becomes the actual return in the FP's
emitCode.
Adapting the skvm code to this wasn't too bad: It looks fragile (what
happens if there are multiple returns?), but that's not really possible
today, without varying control flow.
Bug: skia:10613
Change-Id: I205b81fd87dd32bab30b6d6d5fc78853485da036
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310756
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
When I joined the team, I had a hard time interpreting some of the
Quickstart steps. If you run them as presented, you get seven different
output directories. I've added some text to explain that you don't
actually need this many, and I've also fixed an anchor link.
I made these edits in http://cider/ for its excellent previewing
capabilities, and Cider automatically reformatted and rewrapped the
Markdown to match google3 standards. (e.g. using # and ## to denote
sections, wrapping code blocks in ```.) This doesn't affect the
generated output.
Change-Id: I118a6ed5f6848c845c102ac1670a5d16e79c71fe
No-Try: true
Docs-Preview: https://skia.org/?cl=306717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306717
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: chromium:1101491
Bug: b/161896447
We're moving to using more inclusive language, and thus removing
the word "master". Now these are just "GM" and "DM", which is how
we frequently refer to them anyway.
Change-Id: I844aeb4fc1d97a58a669b4f04821fe06f45d4c73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306059
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Still some more work to do to remove internal usage.
Bug: skia:9832
Change-Id: Id0403d92debc26af2002630a4dfcf960c9343260
Docs-Preview: https://skia.org/?cl=292719
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292719
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
In https://skia-review.googlesource.com/c/skia/+/291182 emscripten was updated
to 1.39.16. This introduced a breaking API change to the CanvasKit
initialization callback, which becomes simply `then()` as opposed to
`ready().then()`. In the course of this change, I missed a few `ready()` calls,
which has broken the examples in public-facing documentation.
E.g. https://skia.org/user/modules/canvaskit. This CL fixes that.
Bug: NONE
Change-Id: I857b4653747cffc3870bf92d479dc88c3fd7d64a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292097
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Change-Id: I2d95c63de18125e6258709b48b03abd7904b7537
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/278596
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>