On Mon, Oct 14, 2013 at 4:16 PM, Benjamin Smedberg <benja...@smedbergs.us>wrote:

> Is canvas-on-a-worker a short-term project?
>

WebGL is at least.

Also from reading the whatwg discussion, I thought you had proposed .toBlob
> but not .toDataURI specifically so that the bitmap was not synchronously
> available (the blob would mediate asynchronously fetching the data).
>

toBlob is async also. We didn't propose toDataURI mainly because it's not
very useful in workers and not a good way to get the bits. The data is
synchronously available. These APIs are only async because it's a bit slow
to do them synchronously --- because we have to read back from the GPU in
some cases, and run the image encoder.

I don't know how Flash bitmaps work in Shumway, but instead of toBlob
(which gives you data in an image format) you probably want getImageData,
which gives you the data in an array, uncompressed, and is synchronous.

It's still not clear to me whether with canvas-on-a-worker you were
> planning on actually doing the graphics on the worker, or just batching
> drawing instructions and sending them over to a separate graphics thread to
> actually be executed.
>

The former, but later the latter.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to