[Top][All Lists]

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

Re: Emacs and Gnome Canvas

From: YAMAMOTO Mitsuharu
Subject: Re: Emacs and Gnome Canvas
Date: Fri, 16 Jul 2010 11:14:27 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Thu, 15 Jul 2010 12:00:05 -0400, Chong Yidong <address@hidden> said:

> A more promising route is the one that Yamamoto Mitsuharu has
> explored, mentioned earlier in this thread, which (IIUC) treats
> Cairo as a graphical terminal to render onto, on the same footing as
> the tty/X/Windows/NS terminals.  Here, I can see a reasonable path
> to real improvement.  For example, it might allow us to use the GTK
> printing infrastructure, which operates on Cairo contexts.  If you
> are interested in redisplay development, that is the direction I'd
> suggest looking into.

My proof-of-concept cairo port was primarily intended for the printing
support, not for screen drawing (though it does both).


Screen drawing in the cairo port is not so efficient for several
reasons.  To make it more efficient, one would need some modest
modifications to the current drawing model in Emacs.

  1. Don't draw during redisplay, but mark the updated area dirty so
     the upcoming exposure event can trigger the actual redraw for the
     area to be updated.
  2. Restrict the actual drawings to those in response to exposure
     events.  This is the standard way in GTK+ and Cocoa.  That would
     make double-buffering straightforward in GTK+ builds.
  3. Make expose_window etc. more efficient.  For example, the
     foreground of same row might currently be redrawn three times for
     some cases in order to handle overlaps between rows with minimal
     flickering.  This can be eliminated if double-buffering is
     introduced and whole the background is drawn at once and then
     whole the foreground is drawn afterwards.
  4. Scrolling in redisplay (x_shift_glyphs_for_insert and
     x_scroll_run) might require special treatment because copied area
     might be marked dirty at the time of scrolling.

                                     YAMAMOTO Mitsuharu

reply via email to

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