Re: drawing speed under Windows



Deborah Swayne <dfs research att com> writes:
> I'm going to revive a topic I raised a year ago and see if
> there's anything new to be said about it. 
> 
> The use of plural drawing routines (draw_points instead of
> draw_point, etc) improves drawing speed **twenty-fold** for
> Windows versions of gtk programs.  I can take advantage of this
> information to improve the drawing speed for points and line
> segments, but I'm in trouble when it comes to polygons and
> arcs.  (I do my work on *nix, but I do want the results to run
> under Windows.)
> 
> Given what I'm learning about the Windows API, the most useful
> routine would be gdk_draw_polygons.  Windows draws rectangles as
> polygons anyway, and they have no plural routine for drawing
> arcs.  (They use routines called PolyPolygon and PolyPolyline
> for drawing multiple polygons.)
> 
> I hope that the gtk designers are willing to take Windows
> portability issues into consideration when making gtk/gdk design
> choices.
> 

The reason draw_points() etc. have never been included is that the
patch has always been for X11. Under X, multiple draw_point() requests
in a row get compressed by Xlib anyhow, so draw_points() is not faster
in any way.

On Windows, the first and best option would be to do something
similar, i.e. transparently do the compression into a single call,
without the programmer having to fool around with making an array of
points or rectangles or whatever. Only if that's for some reason
impossible should we add draw_points(). Because basically
draw_points() is exposing some implementation detail for efficiency
reasons, and there's no reason to do that if we can get the efficiency
without exposing the implementation detail.

> Should I register my problem with bugzilla?  Is there some
> better way to try to get this on the gdk agenda?  I'm more than
> willing to write* gdk_draw_polygons and gdk_win32_draw_polygons,
> but my life will be a lot easier if I can get them included
> in the standard releases.

Yep, bugzilla is the one and only way to get something on the GTK
agenda, and using it early and often is encouraged.  draw_points()
patches for X11 have been rejected before though, for the reason given
above, so we need to establish that Windows draw_point() can't be made
fast. Would help to get input from Tor (GTK/win32 maintainer) on this.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]