[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 02/14] ui: Remove unused QEMU_BIG_ENDIAN_FLAG
From: |
Benjamin Herrenschmidt |
Subject: |
[Qemu-devel] [RFC 02/14] ui: Remove unused QEMU_BIG_ENDIAN_FLAG |
Date: |
Tue, 24 Jun 2014 09:10:56 +1000 |
If we need to, we should use the pixman formats instead but for
now this is unused except in commented out code so take it out
to avoid further confusion about surface endianness.
Signed-off-by: Benjamin Herrenschmidt <address@hidden>
---
include/ui/console.h | 3 +--
ui/console.c | 7 -------
ui/vnc-enc-tight.c | 12 ++++--------
3 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/include/ui/console.h b/include/ui/console.h
index 0a59b8d..e4487b5 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -102,8 +102,7 @@ struct QemuConsoleClass {
ObjectClass parent_class;
};
-#define QEMU_BIG_ENDIAN_FLAG 0x01
-#define QEMU_ALLOCATED_FLAG 0x02
+#define QEMU_ALLOCATED_FLAG 0x01
struct PixelFormat {
uint8_t bits_per_pixel;
diff --git a/ui/console.c b/ui/console.c
index bb304fc..cd31375 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1236,9 +1236,6 @@ static void qemu_alloc_display(DisplaySurface *surface,
int width, int height)
assert(surface->image != NULL);
surface->flags = QEMU_ALLOCATED_FLAG;
-#ifdef HOST_WORDS_BIGENDIAN
- surface->flags |= QEMU_BIG_ENDIAN_FLAG;
-#endif
}
DisplaySurface *qemu_create_displaysurface(int width, int height)
@@ -1263,10 +1260,6 @@ DisplaySurface *qemu_create_displaysurface_from(int
width, int height,
(void *)data, linesize);
assert(surface->image != NULL);
-#ifdef HOST_WORDS_BIGENDIAN
- surface->flags = QEMU_BIG_ENDIAN_FLAG;
-#endif
-
return surface;
}
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index f02352c..3d1b5cd 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -220,8 +220,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h)
unsigned int errors; \
unsigned char *buf = vs->tight.tight.buffer; \
\
- endian = 0; /* FIXME: ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) != \
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG)); */ \
+ endian = 0; /* FIXME */ \
\
\
max[0] = vs->client_pf.rmax; \
@@ -563,8 +562,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w,
int h)
buf32 = (uint32_t *)buf;
memset(vs->tight.gradient.buffer, 0, w * 3 * sizeof(int));
- if (1 /* FIXME: (vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) ==
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) */) {
+ if (1 /* FIXME */) {
shift[0] = vs->client_pf.rshift;
shift[1] = vs->client_pf.gshift;
shift[2] = vs->client_pf.bshift;
@@ -621,8 +619,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w,
int h)
\
memset (vs->tight.gradient.buffer, 0, w * 3 * sizeof(int)); \
\
- endian = 0; /* FIXME: ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) != \
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG)); */ \
+ endian = 0; /* FIXME */ \
\
max[0] = vs->client_pf.rmax; \
max[1] = vs->client_pf.gmax; \
@@ -898,8 +895,7 @@ static void tight_pack24(VncState *vs, uint8_t *buf, size_t
count, size_t *ret)
buf32 = (uint32_t *)buf;
- if (1 /* FIXME: (vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) ==
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) */) {
+ if (1 /* FIXME */) {
rshift = vs->client_pf.rshift;
gshift = vs->client_pf.gshift;
bshift = vs->client_pf.bshift;
--
1.9.1
- Re: [Qemu-devel] [RFC 13/14] vga: Add endian control register, (continued)
- [Qemu-devel] [RFC 12/14] vga: Rename vga_template.h to vga-helpers.h, Benjamin Herrenschmidt, 2014/06/23
- [Qemu-devel] [RFC 05/14] vga: Remove unused vga_draw_line24() and vga_draw_line32(), Benjamin Herrenschmidt, 2014/06/23
- [Qemu-devel] [RFC 11/14] vga: Make fb endian a common state variable, Benjamin Herrenschmidt, 2014/06/23
- [Qemu-devel] [RFC 14/14] ppc/spapr/vga: Switch VGA endian on H_SET_MODE, Benjamin Herrenschmidt, 2014/06/23
- [Qemu-devel] [RFC 02/14] ui: Remove unused QEMU_BIG_ENDIAN_FLAG,
Benjamin Herrenschmidt <=
- Re: [Qemu-devel] [RFC 00/14] VGA cleanups and endian control, Gerd Hoffmann, 2014/06/30