Some performance notes
Rob Gayvert
rtg at rochester.rr.com
Wed Mar 2 12:33:03 UTC 2005
Steven Swerling wrote:
> In other news, I've been working on an "ImageUtilPlugin" with the goal
> of getting Form<->WxBitmap and back. After that, I'm going to try to
> implement a WxMorphicPanel. I've poked around a lot in Morphic and have
> a pretty clear idea of how to do it on the Morphic side (famous last
> words). My guess is that success will hinge on how fast I can turn Forms
> into WxBitmaps. I'm cautiously optimistic, at least for Win32, because:
> 1) SqueakWinIntel.c already has code for using DibSections to update the
> display (for wince), and thus I should be able to swipe some of that
> stuff for getting a DIB section from a Form; 2) WxWidgets in MSW has a
> WxDIB class that is just a windows DIB section (according to a usenet
> post by the guy who wrote WxDIB). Or maybe there is a route to setting
> the bits directly on the WxBitmap itself (I noticed
> WxDIB::ConvertToBitmap includes the line "HBITMAP hbmp =
> ::CreateDIBitmap", so it looks like a WxBitmap is just a windows DDB --
> so I may be able to implement a "Handler" that just calls SetDibBits on
> the DDB.). Anyway, that's my current project. Let me know if you have
> any thoughts on this.
Very cool. WxMorphicPanel has long been on my "things that sound really
cool but I have no idea how hard they are" list.
Judging from the wxWidgets source and the Squeak VM code, it looks like
DDBs are used where possible, so they must be appreciably faster than
DIBs. Do you always need to convert a Form to a wxBitmap, or would it
suffice to draw it in a DC? If the latter, you might be able to do
something along the lines of ioShowDisplay in sqWin32Window.c.
What's your overall scheme? Will morphs draw themselves on a WxCanvas?
And how will events get routed?
More information about the Wxsqueak
mailing list