gnustep-dev
[Top][All Lists]
Advanced

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

Re: Backend functions


From: Fred Kiefer
Subject: Re: Backend functions
Date: Sun, 22 Apr 2001 22:21:49 +0200

I would like to radicalize my last mail. What about dropping the GSWxxx
functions and to keep only the methods? This includes:
GSWDefineAsUserObj, GSWViewIsFlipped, GSWindowDepthForScreen and
GSAvailableDepthsForScreen.

This functions are only used inside the GNUstep gui library and have no
standard PostScript counterpart. So the reason for them being functions
instead of methods is only history and a questionable optimization (As
they get mapped to direct method calls there is not much gain here). I
would recommend, that we only implement real PS operators as (pseudo-)
functions, but keep all our extensions as methods. This leads to a much
cleaner and easier to understand design. 

As most of this methods are really not performance critical, the
GSWViewIsFlipped method (Which I would rename to GSWSetViewIsFlipped) is
the only one to give further thinking. This method provides a small
performance improvement in the xgps backend. So we could either drop it
completely, as it is called in vain most of the times even in the xgps
backend. (As with all optimizations, you should not forget the costs) Or
if someone wants to keep it, we could only call it in the method [NSView
setUpGState]. This way it would be called much less often. But I would
still prefer to drop it.

BTW: Can anybody explain to my, why we need the second DPSgsave() call
in the [NSView lockFocusInRect:] method? Some comments in the code here
would help.

Fred





reply via email to

[Prev in Thread] Current Thread [Next in Thread]