Re: why not empty the scratch image when flush_all_displays
- From: Owen Taylor <otaylor redhat com>
- To: "jianjun.yang" <supermaper gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: why not empty the scratch image when flush_all_displays
- Date: Mon, 13 Nov 2006 09:17:45 -0500
On Mon, 2006-11-13 at 20:28 +0800, jianjun.yang wrote:
> Hi All,
>
>
>
> When gdk_window_process_all_updates, flush_all_displays is invoked.
> Then all the drawing commands are sent to server. Meanwhile, I think
> the contents of the scratch image corresponding current display are no
> longer useful, and should be thrown away. Otherwise, it may increase
> the frequency of invoking to gdk_flush while alloc_scratch_image. So I
> add the gdk_scratch_image_reset to gdk_window_process_all_updates.
gdk_display_flush() [what flush_all_displays() does] actually calls
XFlush(), unlike gdk_flush(), which for weird historical reasons
calls XSync.
Scratch images can only be recycled after XSync(), not after XFlush().
(To reduce the calls to XSync() used with the scratch image cache you
*could* watch for XShmCompletionEvent, though I don't think the
improvement would be that big.)
- Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]