[Spice-devel] [PATCH 0/8] Refactoring canvas code

alexl at redhat.com alexl at redhat.com
Mon Mar 8 09:33:51 PST 2010


From: Alexander Larsson <alexl at redhat.com>

This is a series of patches that clean up the "public" canvas API
by hiding all the internals of the canvas implementation behind
a single SpiceCanvas type with multiple constructors. It also removes
the two canvas-type abstractions that existed before in server/ and
in client/.

Additionally it makes the base class for canvases CanvasBase have
default implementations for many drawing operations, implementing them
by using a set of simple primitives, which are implemented by the cairo
canvas.

This could be further used by the gl canvas to simplify it and avoid
some of the tricky APIs it has to use, and to guarantee the same kind
of rendering as the software fallback (at least wrt which pixels are set
in clipping and path stroking).

Alexander Larsson (8):
  Make canvas Glz decoder integration nicer
  Make glz_decoder non-optional canvas_base in canvas constructors
  Make virt mapping an interface
  Move virtualization of canvas drawing into common/canvas_base
  Move canvas_region and group_start/end to canvas_base
  Move most of the shared draw_xyz() methods from CairoCanvas to
    CanvasBase
  Move canvas_draw_stroke to canvas_base
  Move draw_rop3 to canvas_base

 client/canvas.cpp           |   69 ++-
 client/canvas.h             |   30 +-
 client/glz_decoder.cpp      |   14 +
 client/glz_decoder.h        |    6 +-
 client/red_cairo_canvas.cpp |   99 +---
 client/red_cairo_canvas.h   |   25 -
 client/red_gdi_canvas.cpp   |   89 +---
 client/red_gdi_canvas.h     |   20 -
 client/red_gl_canvas.cpp    |  104 +---
 client/red_gl_canvas.h      |   20 +-
 common/cairo_canvas.c       | 1617 ++++---------------------------------------
 common/cairo_canvas.h       |   52 +--
 common/canvas_base.c        | 1521 +++++++++++++++++++++++++++++++++++++++-
 common/canvas_base.h        |  152 ++++-
 common/gdi_canvas.c         |  120 ++--
 common/gdi_canvas.h         |   38 +-
 common/gl_canvas.c          |  156 +++--
 common/gl_canvas.h          |   54 +--
 server/red_worker.c         |  315 +++------
 19 files changed, 2139 insertions(+), 2362 deletions(-)



More information about the Spice-devel mailing list