[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 20/29] vmsvga: Use standard names for params definin
From: |
Liran Alon |
Subject: |
[Qemu-devel] [PATCH 20/29] vmsvga: Use standard names for params defining hardware cursor image |
Date: |
Thu, 9 Aug 2018 14:46:33 +0300 |
From: Leonid Shatz <address@hidden>
AND/XOR mask is a standard method for defining hardware cursor images.
These are also the names suggested by VMware SVGA DevKit.
Signed-off-by: Leonid Shatz <address@hidden>
Reviewed-by: Darren Kenny <address@hidden>
Signed-off-by: Liran Alon <address@hidden>
---
hw/display/vmware_vga.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index 73e373665bdb..d79b3400452b 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -619,8 +619,8 @@ struct vmsvga_cursor_definition_s {
uint32_t bpp;
int hot_x;
int hot_y;
- uint32_t mask[1024];
- uint32_t image[4096];
+ uint32_t and_mask[1024];
+ uint32_t xor_mask[4096];
};
#define SVGA_BITMAP_SIZE(w, h) ((((w) + 31) >> 5) * (h))
@@ -638,20 +638,20 @@ static inline void vmsvga_cursor_define(struct
vmsvga_state_s *s,
qc->hot_y = c->hot_y;
switch (c->bpp) {
case 1:
- cursor_set_mono(qc, 0xffffff, 0x000000, (void *)c->image,
- 1, (void *)c->mask);
+ cursor_set_mono(qc, 0xffffff, 0x000000, (void *)c->xor_mask,
+ 1, (void *)c->and_mask);
#ifdef DEBUG
cursor_print_ascii_art(qc, "vmware/mono");
#endif
break;
case 32:
/* fill alpha channel from mask, set color to zero */
- cursor_set_mono(qc, 0x000000, 0x000000, (void *)c->mask,
- 1, (void *)c->mask);
+ cursor_set_mono(qc, 0x000000, 0x000000, (void *)c->and_mask,
+ 1, (void *)c->and_mask);
/* add in rgb values */
pixels = c->width * c->height;
for (i = 0; i < pixels; i++) {
- qc->data[i] |= c->image[i] & 0xffffff;
+ qc->data[i] |= c->xor_mask[i] & 0xffffff;
}
#ifdef DEBUG
cursor_print_ascii_art(qc, "vmware/32bit");
@@ -801,9 +801,9 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
if (cursor.width > 256
|| cursor.height > 256
|| cursor.bpp > 32
- || SVGA_BITMAP_SIZE(x, y) > ARRAY_SIZE(cursor.mask)
+ || SVGA_BITMAP_SIZE(x, y) > ARRAY_SIZE(cursor.and_mask)
|| SVGA_PIXMAP_SIZE(x, y, cursor.bpp)
- > ARRAY_SIZE(cursor.image)) {
+ > ARRAY_SIZE(cursor.xor_mask)) {
goto badcmd;
}
@@ -813,10 +813,10 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
}
for (args = 0; args < SVGA_BITMAP_SIZE(x, y); args++) {
- cursor.mask[args] = vmsvga_fifo_read_raw(s);
+ cursor.and_mask[args] = vmsvga_fifo_read_raw(s);
}
for (args = 0; args < SVGA_PIXMAP_SIZE(x, y, cursor.bpp); args++) {
- cursor.image[args] = vmsvga_fifo_read_raw(s);
+ cursor.xor_mask[args] = vmsvga_fifo_read_raw(s);
}
#ifdef HW_MOUSE_ACCEL
vmsvga_cursor_define(s, &cursor);
--
1.9.1
- [Qemu-devel] [PATCH 10/29] vmsvga: Remove treatment of deprecated commands as Nop, (continued)
- [Qemu-devel] [PATCH 10/29] vmsvga: Remove treatment of deprecated commands as Nop, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 11/29] vmsvga: Remove handler of SVGA_CMD_INVALID_CMD, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 12/29] vmsvga: Add definitions of FIFO registers and report their number, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 13/29] vmsvga: Add support for extended FIFO registers, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 14/29] vmsvga: Setup interrupt pin, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 15/29] vmsvga: Add interrupt mask and status registers, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 16/29] vmsvga: Add framework code for SVGA command to raise interrupt, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 17/29] vmsvga: Define interrupt source flags for interrupt status and mask registers, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 18/29] vmsvga: Add support for SVGA_IRQFLAG_FIFO_PROGRESS, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 19/29] vmsvga: Handle SVGA_CMD_FENCE command, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 20/29] vmsvga: Use standard names for params defining hardware cursor image,
Liran Alon <=
- [Qemu-devel] [PATCH 21/29] vmsvga: Use AND mask bpp parameter in SVGA_CMD_DEFINE_CURSOR, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 22/29] vmsvga: Increase size of cursor AND bitmask, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 23/29] vmsvga: Implement initial support for rgb-alpha cursors, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 24/29] vmsvga: Add support for SVGA_FIFO_CAP_CURSOR_BYPASS_3, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 25/29] vmsvga: Add basic support for GMR registers and FIFO commands, Liran Alon, 2018/08/09
- [Qemu-devel] [PATCH 26/29] vmsvga: Add basic support for display topology, Liran Alon, 2018/08/09