[whatwg] Canvas in workers

Kenneth Russell kbr at google.com
Tue Oct 22 10:31:00 PDT 2013

On Mon, Oct 21, 2013 at 8:03 AM, Glenn Maynard <glenn at zewt.org> wrote:
> On Sun, Oct 20, 2013 at 11:53 PM, Robert O'Callahan <robert at ocallahan.org>
> wrote:
>> Glenn, taking a step back for a bit, is there anything in
>> https://wiki.mozilla.org/User:Roc/WorkerCanvasProposal that you would
>> actually object to? IOW, is there anything there that you would think is
>> completely superfluous to the platform if all your proposals were to be
>> adopted as well?
> I have no objection to the overall change from CanvasProxy to WorkerCanvas,
> eg. the stuff in Kyle's original mail to the thread.  (Being able to settle
> on that is one of the reasons I've tried to detach discussion for the other
> use cases.)
> I'd only recommend leaving out transferToImageBitmap, srcObject and
> ImageBitmap.close() parts.  I do think that would be redundant with with
> "present" proposal.  They can always be added later, and leaving them out
> keeps the WorkerCanvas proposal itself focused.

Robert, please don't remove those APIs from your proposal. They're
needed in order to address known use cases, and splitting them off
will make it difficult to understand how they interact with
WorkerCanvas later.

I would like to suggest changing the 'srcObject' property on
HTMLImageElement into some sort of method taking ImageBitmap as
argument. If an ImageBitmap had been previously set against the
HTMLImageElement, the method would automatically call 'close()'
against it. Fundamentally there should be some easy way to repeatedly
update the HTMLImageElement without having to query its previous
ImageBitmap and call close() against it before setting srcObject.

Would you consider copying
https://wiki.mozilla.org/User:Roc/WorkerCanvasProposal to
http://wiki.whatwg.org/wiki/Category:Proposals so that it's easier to
collaborate on it?

More information about the whatwg mailing list