Problem with Native File Dialogs for Windows
Hi All,
It's been a very long time now, and I'm so close; but I've got one last (possibly fatal) problem with my native file dialogs for windows project. I've been having problems with rendering the preview image in the side bar (last time I spoke to this community, the consensus was that preview was a requisite for the feature to be included).
Basically my problem is that inkscape only seems to support loading, and rendering an SVG in the main UI thread - anything else causes it to die. But also only the main thread can handle Windows messages. So I can get the SVG to render into my preview pane, but during rendering, because the rendering occurs in the main thread, the UI locks up until the rendering is complete. Given that calling sp_document_new to load the file blocks for 100-600ms, and rendering takes 200-1500ms for practical SVGs, the code that I have can hardly be called an upgrade!
I'm just wondering, is there *any* way at all that the preview document can be loaded, or the document rendered without making a blocking call? or is there any way that this could happen in worker thread? Because as you can see from the screenshot (attached) almost everything else is working perfectly, and the whole thing is looking resonably slick. Also it'd be great to be able to get this feature in, because last time I counted (in the old sourceforge tracker), it would close no less than 8 bugs in the tracker.
Any suggestions?
Joel
-----Original Message----- From: inkscape-devel-bounces@lists.sourceforge.net [mailto:inkscape-devel-bounces@lists.sourceforge.net] On Behalf Of joel@...1709... Sent: maandag 24 december 2007 1:53
Basically my problem is that inkscape only seems to support loading, and rendering an SVG in the main UI thread - anything else causes it to die. But also only the main thread can handle Windows messages. So I can get the SVG to render into my preview pane, but during rendering, because the rendering occurs in the main thread, the UI locks up until the rendering is complete. Given that calling sp_document_new to load the file blocks for 100-600ms, and rendering takes 200-1500ms for practical SVGs, the code that I have can hardly be called an upgrade!
Why does the current preview not suffer from this?
-johan
Just curious: will there be a "toggle preview on/off" possibility as in the current file dialog?
Molumen
----- Original Message ----- From: joel@...1709... To: inkscape-devel@lists.sourceforge.net Sent: Monday, December 24, 2007 1:52 AM Subject: [Inkscape-devel] Problem with Native File Dialogs for Windows
Hi All,
It's been a very long time now, and I'm so close; but I've got one last (possibly fatal) problem with my native file dialogs for windows project. I've been having problems with rendering the preview image in the side bar (last time I spoke to this community, the consensus was that preview was a requisite for the feature to be included).
Basically my problem is that inkscape only seems to support loading, and rendering an SVG in the main UI thread - anything else causes it to die. But also only the main thread can handle Windows messages. So I can get the SVG to render into my preview pane, but during rendering, because the rendering occurs in the main thread, the UI locks up until the rendering is complete. Given that calling sp_document_new to load the file blocks for 100-600ms, and rendering takes 200-1500ms for practical SVGs, the code that I have can hardly be called an upgrade!
I'm just wondering, is there *any* way at all that the preview document can be loaded, or the document rendered without making a blocking call? or is there any way that this could happen in worker thread? Because as you can see from the screenshot (attached) almost everything else is working perfectly, and the whole thing is looking resonably slick. Also it'd be great to be able to get this feature in, because last time I counted (in the old sourceforge tracker), it would close no less than 8 bugs in the tracker.
Any suggestions?
Joel
------------------------------------------------------------------------------
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------------------------
_______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Dec 23, 2007 8:52 PM, joel@...1709... <joel@...1709...> wrote:
Basically my problem is that inkscape only seems to support loading, and rendering an SVG in the main UI thread - anything else causes it to die. But also only the main thread can handle Windows messages. So I can get the SVG to render into my preview pane, but during rendering, because the rendering occurs in the main thread, the UI locks up until the rendering is complete. Given that calling sp_document_new to load the file blocks for 100-600ms, and rendering takes 200-1500ms for practical SVGs, the code that I have can hardly be called an upgrade!
Perhaps you could use the cairo renderer for the previews, since we already include cairo, so you'll only need to include some bits from rsvg (or whatever the cairo-based svg viewer is called). This can be done in a different thread and I suspect would be generally faster than Inkscape renderer anway.
participants (3)
-
unknown@example.com
-
bulia byak
-
joel@...1709...