[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gslib patch second version
From: |
Adam Fedor |
Subject: |
Re: gslib patch second version |
Date: |
Tue, 09 Apr 2002 20:05:13 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:0.9.8) Gecko/20020310 |
BALATON Zoltan wrote:
: For performance reasons, you should execute setXgcdrawable,
: setXgcdrawablecolor, and setXoffset as infrequently as possible. It is
Well they are. They should only be executed when the AppKit creates a
new window. I can't imagine it's less expensive to create a new device
for every window, but whatever suites you is fine I guess.
: more efficient to capture a particular graphics state configuration as a
: gstate object and use setgstate to return to it than to use
: setXgcdrawable, setXgcdrawablecolor, or setXoffset to reestablish the
: configuration each time you need it. In addition, the graphics state
: indeterminacies described above do not occur when using gstate objects.
Well they probably occur when you create a new device also?
Now, probably ghostscript is writting into the main window, while the
AppKit is trying to refresh from the drawable.
I think this is the main source of conflict now. For testing it would be
enough to force all windows to be unbuffered for now. Is there a way to do
that?
Nope. Maybe a default would work...
The main problem is that the gs x11 driver closes and re-opens the device
when a new WindowID is set on it. This erases the window which is probably
not what you want. For this reason I chose to create a new device for
every window. Currently this is done for every context but the
contextDevice method should really check if there is already a device for
the window and should probably use that. I didn't bother implementing this
until we decide which is the right way.
OK. Probably no need to check. contextDevice should only be called when
a window is created.
--
Adam Fedor, Digital Optics Corp. | I'm glad I hate spinach, because
http://www.doc.com | if I didn't, I'd eat it, and you
| know how I hate the stuff.