[PATCH 0/3] simplify pixmap create/free hooks

Jamey Sharp jamey at minilop.net
Sat Oct 1 23:08:45 PDT 2011


During last year's XDS, I started an experiment to see if resource
allocation and freeing could lose the horrible wrap/unwrap boilerplate.
As I recall, I got the idea from something keithp said: Create and Free
hooks could be implemented with callbacks.h instead.

I didn't finish that experiment, but I think these patches are
improvements regardless, and they nicely pave the way for further
cleanups if somebody gets around to it.

The following changes since commit e45a5c9dcf77fc61bfed055f7d7a437741d07315:

  Make GC clientClip always be a region. (2011-09-28 13:27:04 -0700)

are available in the git repository at:
  git://anongit.freedesktop.org/~jamey/xserver pixmap-hooks

Jamey Sharp (3):
      Have FreePixmap call screen hooks, not the other way around.
      Introduce CreatePixmap, allocating a header and calling screen hooks.
      Move pixmap size limit checking to CreatePixmap, from screen hooks.

 Xext/saver.c                           |    4 +-
 Xext/shm.c                             |   34 +++++-------
 Xext/xvmain.c                          |   10 +--
 composite/compalloc.c                  |    6 +-
 composite/compwindow.c                 |    7 +-
 dbe/midbe.c                            |   42 +++++---------
 dix/dispatch.c                         |   12 +---
 dix/gc.c                               |   27 ++++-----
 dix/glyphcurs.c                        |    8 +--
 dix/pixmap.c                           |   53 +++++++++++------
 dix/window.c                           |   21 +++----
 doc/Xserver-spec.xml                   |   43 +++++---------
 exa/exa_classic.c                      |   70 ++++++++++-------------
 exa/exa_driver.c                       |   50 +++++++----------
 exa/exa_glyphs.c                       |   20 ++----
 exa/exa_mixed.c                        |   56 +++++++-----------
 exa/exa_offscreen.c                    |    4 +-
 exa/exa_priv.h                         |   21 +++----
 exa/exa_render.c                       |    7 +-
 fb/fb.h                                |   12 ++--
 fb/fb24_32.c                           |    2 +-
 fb/fbgc.c                              |    4 +-
 fb/fboverlay.c                         |    4 +-
 fb/fbpixmap.c                          |   67 +++++----------------
 fb/fbwindow.c                          |    2 +-
 glx/glxcmds.c                          |    3 +-
 hw/dmx/dmxpixmap.c                     |   42 +++-----------
 hw/dmx/dmxpixmap.h                     |    6 +-
 hw/dmx/glxProxy/glxext.c               |    4 +-
 hw/xfree86/common/xf86DGA.c            |    6 +-
 hw/xfree86/common/xf86VGAarbiter.c     |   11 ++--
 hw/xfree86/common/xf86VGAarbiterPriv.h |    3 +-
 hw/xfree86/xaa/xaaInit.c               |   99 ++++++++++++++-----------------
 hw/xnest/Pixmap.c                      |   40 +++----------
 hw/xnest/XNPixmap.h                    |    5 +-
 hw/xwin/win.h                          |    5 +-
 hw/xwin/winpixmap.c                    |   51 ++++------------
 include/pixmap.h                       |    7 ++-
 include/scrnintstr.h                   |   10 +--
 mi/miarc.c                             |    9 +--
 mi/mibitblt.c                          |   14 ++---
 mi/midispcur.c                         |   26 ++++----
 mi/migc.c                              |    2 +-
 mi/miglblt.c                           |   10 +--
 mi/miscrinit.c                         |    5 +-
 miext/damage/damage.c                  |   20 +++----
 miext/rootless/rootlessScreen.c        |    2 +-
 miext/shadow/shadow.c                  |    6 +-
 render/glyph.c                         |    8 +--
 render/mipict.c                        |    4 +-
 render/mirect.c                        |    5 +-
 render/picture.c                       |    2 +-
 render/render.c                        |   11 +--
 53 files changed, 398 insertions(+), 604 deletions(-)


More information about the xorg-devel mailing list