Commit Graph

1097 Commits

Author SHA1 Message Date
Kevin Lubick
ffde0f63dd [canvaskit] Get docs ready for npm release
Bug: skia:8584
Change-Id: I290f13e3e05af202f2ffd33f7d9b9361efa80e46
Reviewed-on: https://skia-review.googlesource.com/c/178270
Reviewed-by: Heather Miller <hcm@google.com>
2018-12-18 12:56:18 +00:00
Kevin Lubick
a40f832ae1 [canvaskit] Add Path2D to Canvas API
This moves the shared logic into path2d.js from
canvas2dcontext.js.

Bug: skia:
Change-Id: Id63bc52a190109f7cbc4e17ddb5603e6e87d5dc0
Reviewed-on: https://skia-review.googlesource.com/c/178268
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2018-12-17 21:19:48 +00:00
Kevin Lubick
fa720714c4 [canvaskit] Add files needed for npm release
Backport changes to pathkit too.

Bug: skia:
Change-Id: Id10f9ac52dc7d08f044eee1eeacc8737f1cd96f4
Reviewed-on: https://skia-review.googlesource.com/c/177894
Reviewed-by: Heather Miller <hcm@google.com>
2018-12-17 17:21:34 +00:00
Kevin Lubick
a96ec09599 [canvaskit] Performance tuning of GL calls
Don't check glerror on texture creation.

Initialize before texSubImage2D calls, especially for drawPath
(dramatic Firefox improvement).

Bug: skia:
Change-Id: Iec39fd84fffb886e5ecccf782fe75d419e4255d0
Reviewed-on: https://skia-review.googlesource.com/c/177893
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-17 16:28:30 +00:00
Kevin Lubick
8e4a331c8a [canvaskit] Canvas API for loading fonts
There's the barest hint of a "font manager" here.
Basically, nothing smart to deal with bold or fallbacks.

Maybe one day, we'll expose
SkTypeface* matchStyleCSS3(const SkFontStyle& pattern);

and do smart things for fallbacks, but for now that's not
in the immediate future.

Docs-Preview: https://skia.org/?cl=177067
Bug: skia:
Change-Id: Iaeabcbf5ff4511a01b37c16c983e447c25b0e3e7
Reviewed-on: https://skia-review.googlesource.com/c/177067
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-12-14 21:32:21 +00:00
Kevin Lubick
2b79d1ce45 [canvaskit] Expose setVolatile (especially for animations)
Bug: skia:
Change-Id: Ifd8ef390d1b9a102baaa89804b9f6d11e8f39955
Reviewed-on: https://skia-review.googlesource.com/c/177882
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-12-14 21:24:46 +00:00
Kevin Lubick
d090a706bd [canvaskit] Correctly translate between shadow radius and sigma
Bug: skia:
Change-Id: I7e069407334f8b0238fd6d9f529cdf30e3e269be
Reviewed-on: https://skia-review.googlesource.com/c/176960
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-12 15:40:08 +00:00
Kevin Lubick
ddd0a333f4 [canvaskit] Allow users to load their own fonts
Instead of using the test font(s), now ship with a small
(100k) Monospace font. This can be disabled by:
    compile.sh no_font ...

This saves about 350k (164k gzipped) in binary size.

Bug: skia:
Change-Id: I195e3b35bea86d0f096066c1c6a44a4b602571f3
Reviewed-on: https://skia-review.googlesource.com/c/176580
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-12-12 15:40:08 +00:00
Kevin Lubick
53eabf6871 [canvaskit] Refactor Canvas2D JS into own files
Rather than one monolithic file, we now have one monolithic
file (canvascontext2d) and several smaller files (one per class,
and some helpers).

This should make the code navigation a little easier.

Bug: skia:
Change-Id: Ia191c2db778591af21d2a6126f053c17c4f677f1
Reviewed-on: https://skia-review.googlesource.com/c/175996
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-11 12:02:27 +00:00
Kevin Lubick
5d5723c1d8 [canvaskit] Refactor with getTotalMatrix
Follow up from https://skia-review.googlesource.com/c/skia/+/174843

Bug: skia:
Change-Id: I3b99d8550ecdf8085e11b6fbfbb304c857061149
Reviewed-on: https://skia-review.googlesource.com/c/175583
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-07 18:59:54 +00:00
Kevin Lubick
1646e7d715 [canvaskit] Add isPointInPath / isPointInStroke
While working on this, I realized some things I did
caused winding to be inconsistent with what the Canvas
spec said (and with what Chrome did).

This CL includes 2 changes to remedy that:
 - removal of the subpath (which added needless complication).
 - re-write of ellipse() (to mirror Chrome's implementation).

Bug: skia:
Change-Id: Idd6c8a40b3c46598892e50a1e586f2ff66b801e3
Reviewed-on: https://skia-review.googlesource.com/c/175425
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-07 18:58:48 +00:00
Kevin Lubick
d29edd77f5 [canvaskit] Add createPattern support to canvasAPI
Add Changelog to start tracking API changes (in preparation
for NPM)

Simplify globalAlpha passing.

API change:
 - Make ImageShader take an SkImage instead of encoded bytes.

Bug: skia:
Change-Id: I716f001b54ed58da3f40ae4e060b7098b550af9f
Reviewed-on: https://skia-review.googlesource.com/c/175260
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-07 14:14:37 +00:00
Kevin Lubick
ae9dfc0e58 [canvaskit] In Canvas2d, move matrix to internal canvas
This is similar to how Chrome does it - more or less unapplying
the matrix as it changes to keep everything in the same
coordinate space.

We still need to keep the matrix around for things and do the math
ourselves for things like gradients.

This simplifies a bunch of logic, which makes me happy.

Bug: skia:
Change-Id: I66ee379a501cc6701f51c0f0b51d4e0634a4a692
Reviewed-on: https://skia-review.googlesource.com/c/174843
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-06 17:03:46 +00:00
Hal Canary
b45d512481 bin/sysopen: script moved to bin
No-Try: true
Change-Id: I1b9b1be36c9ed2d574de681b90b98e56f45e70fa
Reviewed-on: https://skia-review.googlesource.com/c/174588
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-12-06 14:21:33 +00:00
Hal Canary
ed18c93d1e bin/gerrit-number (no longer experimental)
Change-Id: Iadbef27074201173be2c71447c5d6f721afffbb3
Reviewed-on: https://skia-review.googlesource.com/c/174585
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-12-05 16:47:29 +00:00
Hal Canary
e0dc346d9e experimental/tools/gerrit-change-id-to-number: cleanup
No-Try: true
Change-Id: I684e681ec38769f5c9b5d66c0190fb08f28ff367
Reviewed-on: https://skia-review.googlesource.com/c/174581
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2018-12-05 16:05:14 +00:00
Kevin Lubick
92d8ea6f99 [canvaskit] remove setMatrix
Bug: skia:
Change-Id: I9fc895e8b499fec8d72dfcd794c705380108bf9b
Reviewed-on: https://skia-review.googlesource.com/c/174314
Reviewed-by: Mike Klein <mtklein@google.com>
2018-12-04 21:32:45 +00:00
Kevin Lubick
52b9f370b3 [canvaskit] Support getImageData/putImageData
setMatrix -> _setMatrix with the hope of removing it
from the API (it breaks the save()/restore() model) and
replacing it with concat (which I'll try in a follow on CL).

Adds MakeImage for those times when a client has pixels
and needs to clip them (e.g. putImageData with 7 args).

This removes SkSurface._readPixels, which I might have
been holding wrong. It might get re-surfaced eventually.

Bug: skia:
Change-Id: Iee9a494db720b22e23f9e674b20ba678fad91d25
Reviewed-on: https://skia-review.googlesource.com/c/174300
Reviewed-by: Mike Klein <mtklein@google.com>
2018-12-04 20:40:14 +00:00
Mike Klein
2d9e543a58 some SkAtomics cleanup
- Replace sk_memory_order with std::memory_order.
 - Remove SkAtomic<T>.

SkPath was the only user of SkAtomic<T>, for its fConvexity and
fFirstDirection fields.  I've replaced them with std::atomic types, and
funneled access to them through methods that enforce the relaxed memory
order like SkAtomic<T> did.

For fConvexity, we can use the exisiting setConvexity() and
getConvexityOrUnknown() methods, adding a private const setConvexity()
to mutate convexity from const methods.  For fFirstDirection I've added
private setFirstDirection() and getFirstDirection() methods.

Removing SkAtomic<T> means SkAtomics.h no longer needs SkNoncopyable.h.
I've had to update a bunch of other headers that were depending on
transitive inclusion.

Change-Id: Ib238be71a121519db6e970a9a8955834e1298c87
Reviewed-on: https://skia-review.googlesource.com/c/174220
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-04 13:53:39 +00:00
Kevin Lubick
f9910ea258 [canvaskit] Add profile mode
Firefox is the only browser that supports WASM+Source maps
so it's only really useful there.

It allows for profiling to see where time is speant, even
down in the C++ calls.  (see the below comment for a screenshot)

Bug: skia:
Change-Id: Ie0380bae9fdea45e1652dd7d2d8036f242087d33
Reviewed-on: https://skia-review.googlesource.com/c/174101
Reviewed-by: Mike Reed <reed@google.com>
2018-12-03 20:43:17 +00:00
Florin Malita
6ba8c7ea84 [skottie] Surface composition markers in CK
Change-Id: Ie53c81f4dbe981327469d8a9990d27f8a41d8b4c
Reviewed-on: https://skia-review.googlesource.com/c/173983
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-12-03 20:12:10 +00:00
Kevin Lubick
7a1b845f2f [canvaskit] remove POC Nima code
Now that drawVertices is exposed, no need to keep this around as a demo

Docs-Preview: https://skia.org/?cl=173994
Bug: skia:
Change-Id: I6293c8e2038ece27635d254db097e651c9d77a94
Reviewed-on: https://skia-review.googlesource.com/c/173994
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-12-03 19:31:09 +00:00
Kevin Lubick
0a1293c2e4 [canvaskit] Add drawImage support
Adds drawImageRect as well.

Bug: skia:
Change-Id: Ib74f92a3ee22664297d8ce7ff1d2cd2644b806b7
Reviewed-on: https://skia-review.googlesource.com/c/173990
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-12-03 18:47:29 +00:00
Florin Malita
91af8d8202 [skottie] Expose composition markers to embedders
Add a MarkerObserver interface (to replace the current
AnnotationObserver), and update CustomPropertyManager to intercept both
properties and markers.

TBR=
Change-Id: If79de419066916bc596316f0a551c75564069239
Reviewed-on: https://skia-review.googlesource.com/c/173766
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-12-01 04:44:03 +00:00
Kevin Lubick
ea905ec333 [canvaskit] Save a copy on CPU backend by using RasterDirect
Draw directly into an unpremul buffer (which is what Canvas's
get/putImageData is) and it speeds up Skottie animation by
about 3x.

Bug: skia:
Change-Id: Ie131276e3a675e0e5a35190da93f34d7469624e4
Reviewed-on: https://skia-review.googlesource.com/c/173644
Reviewed-by: Mike Klein <mtklein@google.com>
2018-11-30 19:29:25 +00:00
Kevin Lubick
dee08d8f65 [canvaskit] Fix conversion of large images to base64
Bug: skia:
Change-Id: I8ab40a382557ae6bd13884ddce027e51ce1fb21f
Reviewed-on: https://skia-review.googlesource.com/c/173701
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-30 18:43:37 +00:00
Kevin Lubick
eb2f6b0adb [canvaskit] Add gradients and clips
Refactors things inside to support both color
and gradient as _fillStyle/_strokeStyle.

Bug: skia:
Change-Id: I364ceb7d55c41e11161d5577dcd1611a592bbc29
Reviewed-on: https://skia-review.googlesource.com/c/173421
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-30 13:06:07 +00:00
Florin Malita
c2e85f942f [skottie] Expose property bindings in CK
Add a new (optionally-built) ManagedAnimation CK helper, and provide
accessors for color and opacity properties.

The new wrapper class can be used as a drop-in replacement for the existing
Animation.

Change-Id: Iab6b6be9c736697b4731722806b145cbd130ce73
Reviewed-on: https://skia-review.googlesource.com/c/173322
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-29 17:09:35 +00:00
Kevin Lubick
43ff69a83f [canvaskit] Fix arc() call
Bug: skia:
Change-Id: I7a06b4bd5d2e88b12b08b0568301515653512ebb
Reviewed-on: https://skia-review.googlesource.com/c/173236
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-28 20:52:09 +00:00
Kevin Lubick
12c0e50fda [canvaskit] support globalAlpha and dashed strokes
This involves a refactor of how we deal with paint.
Now, we have a source-of-truth paint that is copied
and modified for each of fill/stroke/shadow.

Adds preliminary support for blend modes.

Most of what remains is text, images, and gradients.

Bug: skia:
Change-Id: I41806adeb7de4faa6c98a580c4f1de4e4a34a37d
Reviewed-on: https://skia-review.googlesource.com/c/173223
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-28 19:03:19 +00:00
Kevin Lubick
61ef7b2589 [canvaskit] Add shadow and save/restore support
This also exposes the ShadowUtils::drawShadow on Canvas,
even though it wasn't what was needed to duplicate
the Canvas effect.

Bug: skia:
Change-Id: I12276ef106244218e4827b7fcd7949c83cf13e5f
Reviewed-on: https://skia-review.googlesource.com/c/172967
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-27 18:56:09 +00:00
Kevin Lubick
b9db3906d5 [canvaskit] Make transforms work properly
This re-works the subpath model and does transforming
of ports in JS rather than in C++; the latter was not easy
to conform to the Canvas Spec, especially for changing
transforms in the middle of a path.

Additionally adds jpeg to the available images it can produce.

Bug: skia:
Change-Id: I5a52ec341d4060198c8680aa4d3b85a26f77b6b9
Reviewed-on: https://skia-review.googlesource.com/c/172500
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-26 17:16:42 +00:00
Mike Reed
114bde830b Revert "Revert "add rect-parameter to makeImageSnapshot""
This reverts commit 1e28e5d79e.

Bug: skia:
Change-Id: I71c246885721c71de540e9079ecf7323234c8871
Reviewed-on: https://skia-review.googlesource.com/c/172302
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-21 14:46:06 +00:00
Kevin Lubick
6fccc9db67 [canvaskit] Add debug-mode only logs
And a fix for node.

Docs-Preview: https://skia.org/?cl=172143
Bug: skia:
Change-Id: I519c2693b386aa68655f235281d932ee5fffbc61
Reviewed-on: https://skia-review.googlesource.com/c/172143
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-20 22:22:04 +00:00
Kevin Lubick
b07204a6f9 Add software backend to gpu build
Bug: skia:8548
Change-Id: If3853711f4b183f3b0437ae2b31525b0e6c88213
Reviewed-on: https://skia-review.googlesource.com/c/172120
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-20 19:41:27 +00:00
Kevin Lubick
1a05fceb38 [canvaskit] Expand canvas2d API
Made addPath take one more arg to allow for append/expand
(which makes emulating the HTML canvas easier).

Add Gold test for various lineTo/pathTo, etc.

Make CanvasKit.Color() choose a better value for alpha
when omitted (was 0, should be 1).

Add some parsing logic to deal with colors/font sizes.
Fonts are going to be rather complex it seems.

Moves some arc-related logic to the JS side, (although
this should preserve the behavior of CanvasKit.arc() to
behave like the Canvas implementation)

Make Examples and tests to a side-by-side comparison to
HTML canvas where applicable.

Add a Changelog for PathKit.  There was a bug (I thought), but
turns out I was wrong.  The Changelog will be for future
bug fixes.

Bug: skia:
Change-Id: I1bd603fdb518232604b098e24543e3453015b504
Reviewed-on: https://skia-review.googlesource.com/c/170446
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-20 18:39:43 +00:00
Alexander Khovansky
3e11933765 [canvaskit] Exposed SkPath::arc. Exposed SkEncodedImageFormat enum. Exposed SkImage::encodeToData overload with arguments
These changes expose the arc function for SkPath. The ApplyAddArc function is a copy from the PathKit bindings.

Also exposed the PNG and JPEG formats from the SkEncodedImageFormat enum and the SkImage::encodeToData overload that accepts format and quality options. The direct binding of encodeToData was replaced with a pre-js wrapper that calls the appropriate private overload

We are working on a PostCSS conic gradient polyfill plugin and want to use the CanvasKit to generate it.
Problem is - it lacks the arc function that technically exists but isn't exposed. And it would be really great to have encodeToData with options since generated PNGs are quite large.
More details on the issue can be found here: https://github.com/jonathantneal/postcss-conic-gradient/issues/10

R=kjlubick@google.com

Bug: skia:
Change-Id: I3f1dc88ad308369fe62004080bcc196c4fbbf742
Reviewed-on: https://skia-review.googlesource.com/c/171046
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-11-15 02:52:02 +00:00
Mike Klein
54378230f8 Reland "simplify disabling effect deserialization"
This reverts commit 34d7a163a4.

Reason for revert: ok now?

Original change's description:
> Revert "simplify disabling effect deserialization"
>
> This reverts commit 5bbf790b5b.
>
> Reason for revert: flutter GN needs some love
>
> Original change's description:
> > simplify disabling effect deserialization
> >
> > Switch to a simple #define instead of conditional build targets.
> >
> > No one changes skia_enable_effects or skia_enable_effects_imagefilters,
> > so we can merge all that together back into :skia.
> >
> > Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
> > Reviewed-on: https://skia-review.googlesource.com/c/169220
> > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > Commit-Queue: Mike Klein <mtklein@google.com>
>
> TBR=mtklein@google.com,kjlubick@google.com
>
> Change-Id: I3b818418d303dbc6d2a926a19df64a68499f0ec3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/169222
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,kjlubick@google.com

Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Release-Flutter_Android
Change-Id: I534346c3ef3561a871f1af6df976bfee0b48014a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/169640
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-11-08 14:26:52 +00:00
Mike Klein
34d7a163a4 Revert "simplify disabling effect deserialization"
This reverts commit 5bbf790b5b.

Reason for revert: flutter GN needs some love

Original change's description:
> simplify disabling effect deserialization
> 
> Switch to a simple #define instead of conditional build targets.
> 
> No one changes skia_enable_effects or skia_enable_effects_imagefilters,
> so we can merge all that together back into :skia.
> 
> Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
> Reviewed-on: https://skia-review.googlesource.com/c/169220
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,kjlubick@google.com

Change-Id: I3b818418d303dbc6d2a926a19df64a68499f0ec3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/169222
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 18:52:19 +00:00
Mike Klein
5bbf790b5b simplify disabling effect deserialization
Switch to a simple #define instead of conditional build targets.

No one changes skia_enable_effects or skia_enable_effects_imagefilters,
so we can merge all that together back into :skia.

Change-Id: I2985f95ee89149ddc687dc31f4c6bf35cb3a93c7
Reviewed-on: https://skia-review.googlesource.com/c/169220
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 18:20:23 +00:00
Kevin Lubick
e5a06e7bd3 [canvaskit] Update examples after enum name change
Docs-Preview: https://skia.org/?cl=169186
Bug: skia:
Change-Id: I083a07cc44e1534f4aeedc4e25e8ed786e29f168
Reviewed-on: https://skia-review.googlesource.com/c/169186
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-07 15:45:14 +00:00
Kevin Lubick
e71e9ef311 [canvaskit] Add catchException everywhere
This should make the logs in the bots more actionable by showing
the error and trace.

This also fixes the API change causing mysterious red.

Bug: skia:
Change-Id: I38df2bb4557041f8bdfefcae5c8d95b58e770033
Reviewed-on: https://skia-review.googlesource.com/c/168180
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-05 13:07:02 +00:00
Kevin Lubick
b5ae3b5afc [canvaskit] Add drawVertices API
This also does some clean up to how we name enums - the caps felt a bit
obnoxious. CAPS are reserved now for constants (like colors).

Small bug fix with leaking memory on discrete path effects

This also adds a few more things from PathKit

Bug: skia:
Change-Id: Iad7e21ac36d35a36a8b255dc82b1dcc886344db1
Reviewed-on: https://skia-review.googlesource.com/c/166804
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-11-03 12:18:04 +00:00
Mike Reed
f67b1620aa add pvg experiment
Bug: skia:
Change-Id: I4b7e512e6ee8e4da4ab96924acc034355ae6b8bf
Reviewed-on: https://skia-review.googlesource.com/c/167101
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-02 15:35:21 +00:00
Hal Canary
a0a6fe44fc experimental/tools/generate-unicode-test-txt: update
No-Try: true
Change-Id: Ie904a1493570e7f2d50ab2e79c30951610641428
Reviewed-on: https://skia-review.googlesource.com/c/166802
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-10-31 17:05:54 +00:00
Kevin Lubick
134be1d9ba [canvaskit] Expose nima animation as POC
Still to come, actually exposing drawVertices, and the
other APIs needed.

Had to re-make all the jsfiddles because of an API change
in a previous CL.

Docs-Preview: https://skia.org/?cl=166444
Bug: skia:
Change-Id: I4d4825f6e7b073d6792ab8d99d5117df860d4815
Reviewed-on: https://skia-review.googlesource.com/c/166444
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-10-30 20:15:28 +00:00
Kevin Lubick
d969932474 Refactor Nima code
There were two copies of a Nima "player" and this moves them out of
samplecode/ and viewer/ to experimental/ where it is a bit more
accessible (e.g. for WebAssembly).

Bug: skia:
Change-Id: I05419a352f0d13d16b462a374578107513eb1243
Reviewed-on: https://skia-review.googlesource.com/c/166441
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-30 19:32:52 +00:00
Kevin Lubick
2cf29ce4db [canvaskit] Remove ReadBuffer
Takes about 20kb off uncompressed size, 8kb gzipped.

Also turns off AAA and DAA on CPU builds (already off on GPU)

Bug: skia:
Change-Id: I708038394b61cc8eb7944d5ad1a3bb494db6c719
Reviewed-on: https://skia-review.googlesource.com/c/165100
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-25 19:17:59 +00:00
Kevin Lubick
006a6f3b14 [canvaskit] Fleshing out the beginnings of a Canvas API
I can probably write most, if not all, of a Canvas API in
JS using the SkCanvas and SkPaint objects. This lets us expose
the fancier API and optionally have a more familiar API.

This is controlled at compile time, i.e. bring in the extra
JS or not.

There is still plenty of the API that needs working, but
this is meant to outlay the plans of where this is going.

Bug: skia:
Change-Id: I2e36a33c24c2bacd52811dc85508dba170ab0dd7
Reviewed-on: https://skia-review.googlesource.com/c/163490
Reviewed-by: Mike Reed <reed@google.com>
2018-10-22 18:02:09 +00:00
Kevin Lubick
9e40e6fa79 Give attribution
Bug: skia:8488
Change-Id: If96c6bb500ceb0bf4b41c9b3aaf10aa9ad301c70
Reviewed-on: https://skia-review.googlesource.com/c/164260
Reviewed-by: Heather Miller <hcm@google.com>
2018-10-22 16:55:34 +00:00