bug-gnustep
[Top][All Lists]
Advanced

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

some diffs to optimize flushing


From: Benhur Stein
Subject: some diffs to optimize flushing
Date: Mon, 17 Feb 2003 19:28:09 -0300
User-agent: Internet Messaging Program (IMP) 3.0

Hi steppers.

Here are a few diffs to change a bit when window flushing is done,
to get some more performance and a bit less flashing.

It's a small change that moves calls to disable/enableFlush and
flushWindow from NSWindow into NSView. The idea is that 
the -display method of any NSView can be called anytime, and
that should cause the view (and the affected subviews) to be drawn
and the window to be flushed. The problem is that the view must
flush after drawing, but subviews' display methods are called, and
they flush the window too, so the window is flushed for each subview.
The change protects the two display methods in NSView that really do
the drawing (btw, they are almost identical) with calls to 
disable/enableFlush so that the subviews' calls
to flush the window will be ignored. With this control in NSView, it
is not necessary anymore in NSWindow, as NSWindow's display methods are
simply calls to similar methods in the content view.

The other change in the patch is to eliminate a call to flush inside -update.
This can reveal bugs elsewhere (that will show up by some things not
appearing on screen when they should), in methods that do not
flush their window when they should. Even if this line is not eliminated,
I think that it should at least be protected by a test to see
if the window should really be flushed, or changed into a call to
[self flushWindowIfNeeded].

Regards,
Benhur

Attachment: flush.diff
Description: Binary data


reply via email to

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