diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-03-03 15:08:58 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-03-08 19:45:28 +0100 |
commit | f8217d8b96f35fd297c74df1da6428b56b01149a (patch) | |
tree | ba51569d697f284b0048337202c74539a8f6a193 /client/red_gdi_canvas.cpp | |
parent | 05697e502d709974f9b94feca5d9bdde20b993be (diff) | |
download | spice-f8217d8b96f35fd297c74df1da6428b56b01149a.tar.gz spice-f8217d8b96f35fd297c74df1da6428b56b01149a.tar.xz spice-f8217d8b96f35fd297c74df1da6428b56b01149a.zip |
Move virtualization of canvas drawing into common/canvas_base
Instead of having two virtualizations of the canvas we push the
virtualization into the canvas code itself. This not only avoids
the duplication of this code, it also makes the exposed API for the
canvas much smaller (in terms of exported API).
It also lets us use the virtualization to implement basic support
for operations in canvas_base which is then overridden by each canvas
implementation.
Diffstat (limited to 'client/red_gdi_canvas.cpp')
-rw-r--r-- | client/red_gdi_canvas.cpp | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/client/red_gdi_canvas.cpp b/client/red_gdi_canvas.cpp index efdf5d4d..a623e64c 100644 --- a/client/red_gdi_canvas.cpp +++ b/client/red_gdi_canvas.cpp @@ -26,7 +26,6 @@ GDICanvas::GDICanvas(PixmapCache& pixmap_cache, PaletteCache& palette_cache, GlzDecoderWindow &glz_decoder_window) : Canvas (pixmap_cache, palette_cache, glz_decoder_window) - , _canvas (NULL) , _pixmap (0) { } @@ -44,13 +43,6 @@ void GDICanvas::destroy() destroy_pixmap(); } -void GDICanvas::clear() -{ - if (_canvas) { - gdi_canvas_clear(_canvas); - } -} - void GDICanvas::destroy_pixmap() { delete _pixmap; @@ -97,82 +89,6 @@ void GDICanvas::set_mode(int width, int height, int depth) } } -void GDICanvas::set_access_params(unsigned long base, unsigned long max) -{ - gdi_canvas_set_access_params(_canvas, base, max); -} - -void GDICanvas::draw_fill(SpiceRect *bbox, SpiceClip *clip, SpiceFill *fill) -{ - gdi_canvas_draw_fill(_canvas, bbox, clip, fill); -} - -void GDICanvas::draw_text(SpiceRect *bbox, SpiceClip *clip, SpiceText *text) -{ - gdi_canvas_draw_text(_canvas, bbox, clip, text); -} - -void GDICanvas::draw_opaque(SpiceRect *bbox, SpiceClip *clip, SpiceOpaque *opaque) -{ - gdi_canvas_draw_opaque(_canvas, bbox, clip, opaque); -} - -void GDICanvas::draw_copy(SpiceRect *bbox, SpiceClip *clip, SpiceCopy *copy) -{ - gdi_canvas_draw_copy(_canvas, bbox, clip, copy); -} - -void GDICanvas::draw_transparent(SpiceRect *bbox, SpiceClip *clip, SpiceTransparent* transparent) -{ - gdi_canvas_draw_transparent(_canvas, bbox, clip, transparent); -} - -void GDICanvas::draw_alpha_blend(SpiceRect *bbox, SpiceClip *clip, SpiceAlphaBlnd* alpha_blend) -{ - gdi_canvas_draw_alpha_blend(_canvas, bbox, clip, alpha_blend); -} - -void GDICanvas::copy_bits(SpiceRect *bbox, SpiceClip *clip, SpicePoint *src_pos) -{ - gdi_canvas_copy_bits(_canvas, bbox, clip, src_pos); -} - -void GDICanvas::draw_blend(SpiceRect *bbox, SpiceClip *clip, SpiceBlend *blend) -{ - gdi_canvas_draw_blend(_canvas, bbox, clip, blend); -} - -void GDICanvas::draw_blackness(SpiceRect *bbox, SpiceClip *clip, SpiceBlackness *blackness) -{ - gdi_canvas_draw_blackness(_canvas, bbox, clip, blackness); -} - -void GDICanvas::draw_whiteness(SpiceRect *bbox, SpiceClip *clip, SpiceWhiteness *whiteness) -{ - gdi_canvas_draw_whiteness(_canvas, bbox, clip, whiteness); -} - -void GDICanvas::draw_invers(SpiceRect *bbox, SpiceClip *clip, SpiceInvers *invers) -{ - gdi_canvas_draw_invers(_canvas, bbox, clip, invers); -} - -void GDICanvas::draw_rop3(SpiceRect *bbox, SpiceClip *clip, SpiceRop3 *rop3) -{ - gdi_canvas_draw_rop3(_canvas, bbox, clip, rop3); -} - -void GDICanvas::draw_stroke(SpiceRect *bbox, SpiceClip *clip, SpiceStroke *stroke) -{ - gdi_canvas_draw_stroke(_canvas, bbox, clip, stroke); -} - -void GDICanvas::put_image(HDC dc, const PixmapHeader& image, const SpiceRect& dest, const QRegion* clip) -{ - gdi_canvas_put_image(_canvas, dc, &dest, image.data, image.width, image.height, image.stride, - clip); -} - CanvasType GDICanvas::get_pixmap_type() { return CANVAS_TYPE_GDI; |