On Sun, Apr 15, 2012 at 5:07 PM, Julian Viereck <
jvie...@mozilla.com> wrote:
> The good print quality is achieved by using a new `canvas.mozPrintCallback` API, that I'm working on in [1]. The current version of the mozPrintCallback API implies, that all data required for printing is processed and loaded in a sync way.
That seems like a very bad a API design assumption.
> Fontdata is loaded sync, if the url is a data-url.
That's unfortunate. It's not nice for behavior to depend on the URI
scheme like that.
> I'm wondering if it is possible to make image loading sync as well, if the image.src url is a data-url. Alternatively, can a new property `sync` get added to the image object, that implies loading the image to be sync?
Please, let's not go there. The plan is to move the XML parser off the
main thread and SVG documents can appear as images. Doing parsing off
the main thread implies that to get anything done from the point of
view of the main thread, there are at least two main-thread event
queue tasks involved: one task that sends data to the parser thread
and another task that handles getting data back. Even for bitmaps, I
think it is a bad idea to lock us into assumptions about to decoding a
large bitmaps as a single main-thread event queue tasks.
--
Henri Sivonen
hsiv...@iki.fi
http://hsivonen.iki.fi/