From a1ec6e065a1d39426949a322eeb67f8fb9f854e5 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 23 Apr 2010 16:35:31 +0200 Subject: Fix up win32 client with recent changes --- client/red_gdi_canvas.cpp | 16 ++++++---------- client/windows/red_pixmap_gdi.cpp | 2 +- client/windows/red_window.cpp | 9 +++++++++ 3 files changed, 16 insertions(+), 11 deletions(-) (limited to 'client') diff --git a/client/red_gdi_canvas.cpp b/client/red_gdi_canvas.cpp index 0ea53ed4..391883b7 100644 --- a/client/red_gdi_canvas.cpp +++ b/client/red_gdi_canvas.cpp @@ -31,12 +31,12 @@ GDICanvas::GDICanvas(int width, int height, uint32_t format, { _pixmap = new RedPixmapGdi(width, height, RedDrawable::format_from_surface(format), - true, NULL); + true); if (!(_canvas = gdi_canvas_create(width, height, _pixmap->get_dc(), &_pixmap->get_mutex(), - depth, &pixmap_cache().base, - &palette_cache().base, - &csurfaces().base, + format, &pixmap_cache.base, + &palette_cache.base, + &csurfaces.base, &glz_decoder()))) { THROW("create canvas failed"); } @@ -44,8 +44,8 @@ GDICanvas::GDICanvas(int width, int height, uint32_t format, GDICanvas::~GDICanvas() { - _canvas->ops->destroy(_canvas); - _canvas = NULL; + _canvas->ops->destroy(_canvas); + _canvas = NULL; delete _pixmap; _pixmap = NULL; } @@ -72,10 +72,6 @@ void GDICanvas::copy_pixels(const QRegion& region, RedDrawable* dest_dc, const P copy_pixels(region, *dest_dc); } -void GDICanvas::set_mode(int width, int height, int depth) -{ - destroy(); -} CanvasType GDICanvas::get_pixmap_type() { diff --git a/client/windows/red_pixmap_gdi.cpp b/client/windows/red_pixmap_gdi.cpp index 322d0209..b6449b9f 100644 --- a/client/windows/red_pixmap_gdi.cpp +++ b/client/windows/red_pixmap_gdi.cpp @@ -30,7 +30,7 @@ struct RedPixmap_p { }; RedPixmapGdi::RedPixmapGdi(int width, int height, RedDrawable::Format format, bool top_bottom) - : RedPixmap(width, height, format, top_bottom, pallet) + : RedPixmap(width, height, format, top_bottom ) { ASSERT(format == RedDrawable::ARGB32 || format == RedDrawable::RGB32 || format == RedDrawable::A1); ASSERT(sizeof(RedPixmap_p) <= PIXELES_SOURCE_OPAQUE_SIZE); diff --git a/client/windows/red_window.cpp b/client/windows/red_window.cpp index def25870..80a282a0 100644 --- a/client/windows/red_window.cpp +++ b/client/windows/red_window.cpp @@ -364,6 +364,15 @@ void RedWindow_p::destroy(PixelsSource_p& pixels_source) DestroyWindow(_win); } +RedDrawable::Format RedWindow::get_format() +{ + /* TODO: Windows will convert types when + blitting, so this works (and is what we did before). + but it would be better to return the right format here */ + return RedDrawable::RGB32; +} + + void RedWindow_p::on_pos_changing(RedWindow& red_window) { if (_minimized || IsIconic(_win)) { -- cgit