summaryrefslogtreecommitdiffstats
path: root/client/canvas.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-04-21 13:08:52 +0200
committerAlexander Larsson <alexl@redhat.com>2010-04-23 16:39:13 +0200
commit774e5bd36f4fc156dd744a455ff7ddda27441568 (patch)
treecda4d3dcdb1f516a17ca5f74779f3ddbfc691f96 /client/canvas.h
parentd2a2f18b6e1b77bb6a04121455385d7e23e77168 (diff)
downloadspice-774e5bd36f4fc156dd744a455ff7ddda27441568.tar.gz
spice-774e5bd36f4fc156dd744a455ff7ddda27441568.tar.xz
spice-774e5bd36f4fc156dd744a455ff7ddda27441568.zip
Client: Support pixmap format conversion in copy_pixels
In order to be able to support 16bit canvases on 32bit screens and 32bit canvases on 16bit screens we need to handle format conversion when drawing RedPixmaps. The way this works now for X11 is that we only have one PIXELS_SOURCE_TYPE for pixmaps, which always has a pixman_image_t for the data, but additionally it has an XImage (shared mem or not) if the screen the pixmap was created for (i.e. an explicit one or the default screen) has the same format as the pixmap. When we draw a pixmap on a drawable we have two variants. If the pixmap has a XImage and it matches the format of the target drawable then we just X(Shm)PutImage it to the drawable. If the formats differ, then we create a temporary XImage and convert into that before drawing it to the screen. Right now this is a bit inefficient, because we always allocate a new temporary image when converting. We want to add some caching here, but at least this lets things work again.
Diffstat (limited to 'client/canvas.h')
0 files changed, 0 insertions, 0 deletions