TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

CanvasKit – Skia and WebAssembly

127 pointsby espeedalmost 6 years ago

16 comments

atomicUpdatealmost 6 years ago
This page is infuriating to use on my phone. I can barely scroll, and when I do get lucky, it bounces back to the top and more things load.
评论 #20480831 未加载
评论 #20483809 未加载
z3t4almost 6 years ago
I would like a Skia + v8 runtime. Some of my web apps are just a 2d canvas and JavaScript. Would be nice to be able to use them without a browser and bundle with something more lightweight then Electron.
评论 #20482815 未加载
bcheungalmost 6 years ago
What is this for and why would someone want to use it?<p>There&#x27;s basically nothing on the website but the API. No decent overview or tutorial or even why someone would want to use this project.
评论 #20483443 未加载
评论 #20481219 未加载
评论 #20482353 未加载
评论 #20483407 未加载
评论 #20483446 未加载
评论 #20483832 未加载
markdog12almost 6 years ago
They should use the desynchronized canvas flag for lower latency on the ink example.<p>canvas.getContext(&#x27;webgl&#x27;, {desynchronized: true})<p><a href="https:&#x2F;&#x2F;www.chromestatus.com&#x2F;feature&#x2F;6360971442388992" rel="nofollow">https:&#x2F;&#x2F;www.chromestatus.com&#x2F;feature&#x2F;6360971442388992</a>
评论 #20483801 未加载
xfalcoxalmost 6 years ago
I just created a proposal to support lottie based animated stickers in Discourse two days ago, and this looks very useful to get more performance when playing those using the new Skottie module. Very cool!<p><a href="https:&#x2F;&#x2F;meta.discourse.org&#x2F;t&#x2F;plugin-for-animated-stickers&#x2F;123212?u=falco" rel="nofollow">https:&#x2F;&#x2F;meta.discourse.org&#x2F;t&#x2F;plugin-for-animated-stickers&#x2F;12...</a>
alleycat5000almost 6 years ago
I wonder if this is in part driven by Flutter for Web?
评论 #20481702 未加载
评论 #20480686 未加载
espeedalmost 6 years ago
Here&#x27;s one of the Skia Path Ops videos referenced in the Presentation section -- for some reason it links to slides but not the videos...<p>Skia Path Ops : High Performance Set Operations for Geometry<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=OmfliNQsk88" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=OmfliNQsk88</a>
pier25almost 6 years ago
Anyone knows why text looks so blurry?<p>Where are the docs for CanvasKit?
评论 #20480498 未加载
评论 #20480568 未加载
tapirlalmost 6 years ago
Can anyone show the url of the source code (C API?) which is outputted to the wasm file? I mean the subfolder in the skia project.
评论 #20485955 未加载
skybrianalmost 6 years ago
It sounds like this allows you to draw to a WebGL surface as if it were Canvas?
评论 #20479463 未加载
dvhalmost 6 years ago
It takes 1 minute to draw star (first demo). Why is it so slow?
评论 #20480259 未加载
评论 #20480087 未加载
srameshcalmost 6 years ago
Yesterday I saw a post about tinygo (tinygo.org) which can produce WebAssembly code and now Skia + WebAssembly. Fun times are ahead with Go :)
aloeralmost 6 years ago
Would be great if anyone here has some experience with this and examples of use cases. I have been looking at this for a few weeks now for a tile based view with multi threaded rendering and server side prerendering. But I just can&#x27;t figure out what the benefits would be over canvas natively, if there even are any. As I wrote in <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20339574" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20339574</a><p>&quot; context: I want to build a tile based view (tiles in x&#x2F;y dimensions + zoom levels). The content of the tiles is loaded from server (shapes mostly) and rendered into tile images client side. I also want the same tiles prerendered as identical images on the server.<p>For this I have a feeling that something like skia is the way to go. Skia can be used via wasm bindings. How I would fetch the shapes and render the tiles (or fetch the prerendered ones) transparently and then where to render the tiles into, that is what I am trying to figure out. It feels like multithreading could be very useful here. Right now only chrome appears to support OffscreenCanvas (which can be accessed from webworkers), hence the idea of using skia directly and possibly going a level higher to write whatever kind of multithreaded render logic in rust and run it with wasm and a single &quot;canvas output&quot;. Whether skia is the right choice here or not is also something I have yet to figure out<p>The ultimate goal is quick startup (prerendered tiles) while simultaneously high performance when updating the entire view (=multiple tiles in parallel). This is mostly a learning project for me context: I want to build a tile based view (tiles in x&#x2F;y dimensions + zoom levels). The content of the tiles is loaded from server (shapes mostly) and rendered into tile images client side. I also want the same tiles prerendered as identical images on the server.<p>For this I have a feeling that something like skia is the way to go. Skia can be used via wasm bindings. How I would fetch the shapes and render the tiles (or fetch the prerendered ones) transparently and then where to render the tiles into, that is what I am trying to figure out. It feels like multithreading could be very useful here. Right now only chrome appears to support OffscreenCanvas (which can be accessed from webworkers), hence the idea of using skia directly and possibly going a level higher to write whatever kind of multithreaded render logic in rust and run it with wasm and a single &quot;canvas output&quot;. Whether skia is the right choice here or not is also something I have yet to figure out<p>The ultimate goal is quick startup (prerendered tiles) while simultaneously high performance when updating the entire view (=multiple tiles in parallel). This is mostly a learning project for me &quot;<p>Essentially what I am wondering is if using skia via wasm would allow me to bypass limits on canvas natively (and canvas in webworkers) so that I can render multiple tile images in parallel and then draw them into a single view for the user to interact with. Think google maps or similar but tiles rendered client side<p>Overall this feels like there might be a better way and I am just not seeing it
patientplatypusalmost 6 years ago
Can someone explain to me what this drink example is doing?<p><a href="https:&#x2F;&#x2F;jsfiddle.skia.org&#x2F;canvaskit&#x2F;e7ac983d9859f89aff1b6d385190919202c2eb53d028a79992892cacceffd209" rel="nofollow">https:&#x2F;&#x2F;jsfiddle.skia.org&#x2F;canvaskit&#x2F;e7ac983d9859f89aff1b6d38...</a><p>Just from a brief parse of the code I don&#x27;t see how the drink could possibly be transforming the way that it is doing. The renderer - drawFrame in this case - isn&#x27;t doing any heavy lifting to really make all the side animations (drink splash etc) occur.<p>It appears that at least with this example, possibly the others (the lego one?) if they work they&#x27;ve hidden a lot of data in the fetched json data. Which seems not great. I mean the drink json (<a href="https:&#x2F;&#x2F;storage.googleapis.com&#x2F;skia-cdn&#x2F;misc&#x2F;drinks.json" rel="nofollow">https:&#x2F;&#x2F;storage.googleapis.com&#x2F;skia-cdn&#x2F;misc&#x2F;drinks.json</a>) is not human parse-able so I don&#x27;t see how they made these examples at all. Maybe they made them in Adobe After Effects and then exported the keyframes as json or something, but there&#x27;s no tutorial or directions that I can see.<p>This is incredibly frustrating because a decent canvas tool is sorely needed (generally). Does anyone see what is going on?<p>EDIT: So they do use lottie files (<a href="https:&#x2F;&#x2F;lottiefiles.com&#x2F;410-lego-loader" rel="nofollow">https:&#x2F;&#x2F;lottiefiles.com&#x2F;410-lego-loader</a>). But lottie files can already be exported to javascript incredibly easily, so unless you <i>really</i> need the extra performance of WASM this doesn&#x27;t appear to add anything. Am I still missing something?
c-smilealmost 6 years ago
Cool, but why?<p>Any browser already includes the very same set of graphic primitives that Skia provides. Just to render what you see on the screen right now.<p>Why not just to expose all that as API for WASM or whatever?
评论 #20480981 未加载
评论 #20481078 未加载
评论 #20480982 未加载
pier25almost 6 years ago
It&#x27;s less than 50KB Gzipped, not bad at all.<p><a href="https:&#x2F;&#x2F;bundlephobia.com&#x2F;result?p=canvaskit-wasm@0.6.0" rel="nofollow">https:&#x2F;&#x2F;bundlephobia.com&#x2F;result?p=canvaskit-wasm@0.6.0</a>
评论 #20480466 未加载