[whatwg] OffscreenCanvas from a worker and synchronization with DOM/CSS

I just noticed Firefox shipped an OffscreenCanvas implementation. Looking
at the spec it seems there is no way to synchronize updates from a worker
with dom/css manipulations.

Was this already discussed? There are web apps that synchronize HTML dom
elements with canvas updates. I'm sure they'd all love to gain the benefits
of being able to render to their canvas from a worker. But, if they can't
synchronize the canvas update with their DOM element position updates there
will be unacceptable skewing/judder/issues

Maybe it was already decided but I couldn't find the discussion. It seems
like a pretty bold thing to do for HTML because it basically encourages
using as little HTML/DOM/CSS as possible rather than encouraging just doing
some fancy rendering in a worker and the rest in HTML.

A few example of apps that would love to get the benefit of offscreen
rendering in a worker but could not without some way to synchronize

    Apple Maps

    Baidu Maps

    Yahoo Japan Maps

Worse, those things that could have been HTML but are no longer HTML can't
be used in standard ways. For example because Yahoo Japan's Maps use HTML a
translation extension, Rikaikun, is able to provide translations. The
current OffscreenCanvas spec effectively discourages using HTML elements in
these cases making features like these impossible.

    Rakaikun on Yahoo Japan Maps

Another example which would seem really relevant to WebVR is to allow
various parts of a scene to be presented as a fully functional web page
like this example


but that won't work if you can't synchronize dom and offscreencanvas.

Received on Saturday, 23 January 2016 18:50:13 UTC