Community
Participate
Working Groups
CONSIDER 0-thickness fastlines. NOTES: CM (3/20/01 5:56:13 AM) P2/F1 (May 1st, 2001) McQ (27/03/2001 8:57:26 AM) - X windows supports the notion of "zero width" lines, which are actually width 1, but are drawn with the fastest possible line drawing algorithm. The comment was that perhaps we could do something like this. Having looked at the code though, I think we would be better off trying to do the "dirty bits" caching idea, so we didn't have to do a "OS.GetTextColor (handle)" for each line we draw. This needs to be discussed however. SSQ (3/27/01 7:04:35 PM) - Line drawing on Windows has been improved about 8 times by using LOGPEN instead of EXTLOGPEN. Still need to see if Motif line drawing can be improved. McQ (26/06/2001 11:21:50 AM) - The above attempt did not work.
I have no idea what the difference between a LOGPEN and a EXTLOGPEN are. But, in general SWT <code>new</code>s Java Objects within methods such as GC.setForeground(Color). Actually newing objects can be slower than the native call itself. A lot of speedup can be achieved in SWT by doing one of the following: A) pushing everything into the native implementation, which goes AGAINST the SWT philosophy. In this aproach there would be no LOGPEN java class. B) Reusing java instances somehow. For example, re-using the LOGPEN java object for subsequent OS resources. Maybe this doesn't apply to every case by I know the TextConverter can be spead-up substaintially. C) Lazy application of settings. For example, I may call setForeground(Color) twice before actually invoking a method that depends on the foreground color. Only the final operation causes a LOGPEN to be created. However, we are already doing this in draw2d so we wouldn't see any benefit.
Closing. There is nothing else to be done here.