diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-04-21 12:03:06 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-04-23 16:36:35 +0200 |
commit | 2d6fbde89b08b7dd4a2050c71fe6663ea8e9c2d9 (patch) | |
tree | 7a21036fa2fe975dac3462a075ee968eb3ec267f /client/windows | |
parent | 98d91203c5d2f6f7249f38941466857b6a566f5d (diff) | |
download | spice-2d6fbde89b08b7dd4a2050c71fe6663ea8e9c2d9.tar.gz spice-2d6fbde89b08b7dd4a2050c71fe6663ea8e9c2d9.tar.xz spice-2d6fbde89b08b7dd4a2050c71fe6663ea8e9c2d9.zip |
Move RedPixmap::Format to RedDrawable::Format
We need to know the format for other drawables too (like for instance
the native format of a window), so we're pushing this down.
This changes a bunch of references to be RedDrawable::, but not all.
The the old RedPixmap:: references still work, but will be phased out.
Diffstat (limited to 'client/windows')
-rw-r--r-- | client/windows/red_pixmap.cpp | 4 | ||||
-rw-r--r-- | client/windows/red_pixmap_cairo.cpp | 6 | ||||
-rw-r--r-- | client/windows/red_pixmap_gdi.cpp | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/client/windows/red_pixmap.cpp b/client/windows/red_pixmap.cpp index 574d2851..2f8655c4 100644 --- a/client/windows/red_pixmap.cpp +++ b/client/windows/red_pixmap.cpp @@ -20,7 +20,7 @@ #include "debug.h" #include "utils.h" -RedPixmap::RedPixmap(int width, int height, RedPixmap::Format format, +RedPixmap::RedPixmap(int width, int height, RedDrawable::Format format, bool top_bottom) : _format (format) , _width (width) @@ -37,6 +37,6 @@ RedPixmap::~RedPixmap() bool RedPixmap::is_big_endian_bits() { - return _format == RedPixmap::A1; + return _format == RedDrawable::A1; } diff --git a/client/windows/red_pixmap_cairo.cpp b/client/windows/red_pixmap_cairo.cpp index 793d21ed..35fe89b8 100644 --- a/client/windows/red_pixmap_cairo.cpp +++ b/client/windows/red_pixmap_cairo.cpp @@ -33,7 +33,7 @@ RedPixmapCairo::RedPixmapCairo(int width, int height, RedPixmap::Format format, bool top_bottom, RedWindow *win) : RedPixmap(width, height, format, top_bottom) { - ASSERT(format == RedPixmap::ARGB32 || format == RedPixmap::RGB32 || format == RedPixmap::A1); + ASSERT(format == RedDrawable::ARGB32 || format == RedDrawable::RGB32 || format == RedDrawable::A1); ASSERT(sizeof(RedPixmap_p) <= PIXELES_SOURCE_OPAQUE_SIZE); struct { @@ -60,10 +60,10 @@ RedPixmapCairo::RedPixmapCairo(int width, int height, RedPixmap::Format format, #endif*/ bitmap_info.inf.bmiHeader.biPlanes = 1; - bitmap_info.inf.bmiHeader.biBitCount = RedPixmap::format_to_bpp(format); + bitmap_info.inf.bmiHeader.biBitCount = RedDrawable::format_to_bpp(format); bitmap_info.inf.bmiHeader.biCompression = BI_RGB; switch (format) { - case RedPixmap::A1: + case RedDrawable::A1: bitmap_info.inf.bmiColors[0].rgbRed = 0; bitmap_info.inf.bmiColors[0].rgbGreen = 0; bitmap_info.inf.bmiColors[0].rgbBlue = 0; diff --git a/client/windows/red_pixmap_gdi.cpp b/client/windows/red_pixmap_gdi.cpp index 1c90f3d5..322d0209 100644 --- a/client/windows/red_pixmap_gdi.cpp +++ b/client/windows/red_pixmap_gdi.cpp @@ -29,10 +29,10 @@ struct RedPixmap_p { HBITMAP prev_bitmap; }; -RedPixmapGdi::RedPixmapGdi(int width, int height, RedPixmap::Format format, bool top_bottom) +RedPixmapGdi::RedPixmapGdi(int width, int height, RedDrawable::Format format, bool top_bottom) : RedPixmap(width, height, format, top_bottom, pallet) { - ASSERT(format == RedPixmap::ARGB32 || format == RedPixmap::RGB32 || format == RedPixmap::A1); + ASSERT(format == RedDrawable::ARGB32 || format == RedDrawable::RGB32 || format == RedDrawable::A1); ASSERT(sizeof(RedPixmap_p) <= PIXELES_SOURCE_OPAQUE_SIZE); struct { @@ -46,10 +46,10 @@ RedPixmapGdi::RedPixmapGdi(int width, int height, RedPixmap::Format format, bool bitmap_info.inf.bmiHeader.biHeight = top_bottom ? -_height : _height; bitmap_info.inf.bmiHeader.biPlanes = 1; - bitmap_info.inf.bmiHeader.biBitCount = RedPixmap::format_to_bpp(format); + bitmap_info.inf.bmiHeader.biBitCount = RedDrawable::format_to_bpp(format); bitmap_info.inf.bmiHeader.biCompression = BI_RGB; switch (format) { - case RedPixmap::A1: + case RedDrawable::A1: bitmap_info.inf.bmiColors[0].rgbRed = 0; bitmap_info.inf.bmiColors[0].rgbGreen = 0; bitmap_info.inf.bmiColors[0].rgbBlue = 0; |