Lukas Ramach wrote:
However using a loop with PR_sleep() and checking if the image is finished loading does not work, imgIRequest always returns STATUS_NONE.

Any ideas why this happens?

You're not processing events, so necko never gets a chance to notify the app that the data is there (or possibly doesn't even get a chance to start the load).


Is there a way to load the image completely
right before painting it in the RenderingContext?

The only way that comes to mind offhand is to spin up a separate event loop (by pushing a new thread event queue) right before you start the load and then processing events on this until you're done....


You could also file a bug on imagelib requesting some sort of synchonous-like API, I guess.

-Boris
_______________________________________________
mozilla-layout mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-layout

Reply via email to