summary refs log tree commit diff stats
path: root/hw/tc6393xb.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-24 19:29:13 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-24 19:29:13 +0000
commit0e1f5a0c495dd7a5c72c9321a29541bdde8f423a (patch)
tree374c5da7054c16f764a1cb2b5079d612cf417dac /hw/tc6393xb.c
parentcab3bee2d6f1d6eb6ad74006b8a63562cda9ba4d (diff)
downloadfocaccia-qemu-0e1f5a0c495dd7a5c72c9321a29541bdde8f423a.tar.gz
focaccia-qemu-0e1f5a0c495dd7a5c72c9321a29541bdde8f423a.zip
Introduce accessors for DisplayState (Stefano Stabellini)
Introducing some accessors:

ds_get_linesize
ds_get_bits_per_pixel
ds_get_width
ds_get_height
ds_get_data

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5789 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/tc6393xb.c')
-rw-r--r--hw/tc6393xb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/tc6393xb.c b/hw/tc6393xb.c
index 1fe57bd769..3af791fab5 100644
--- a/hw/tc6393xb.c
+++ b/hw/tc6393xb.c
@@ -430,7 +430,7 @@ static void tc6393xb_nand_writeb(struct tc6393xb_s *s, target_phys_addr_t addr,
 
 static void tc6393xb_draw_graphic(struct tc6393xb_s *s, int full_update)
 {
-    switch (s->ds->depth) {
+    switch (ds_get_bits_per_pixel(s->ds)) {
         case 8:
             tc6393xb_draw_graphic8(s);
             break;
@@ -447,7 +447,7 @@ static void tc6393xb_draw_graphic(struct tc6393xb_s *s, int full_update)
             tc6393xb_draw_graphic32(s);
             break;
         default:
-            printf("tc6393xb: unknown depth %d\n", s->ds->depth);
+            printf("tc6393xb: unknown depth %d\n", ds_get_bits_per_pixel(s->ds));
             return;
     }
 
@@ -462,11 +462,11 @@ static void tc6393xb_draw_blank(struct tc6393xb_s *s, int full_update)
     if (!full_update)
         return;
 
-    w = s->scr_width * ((s->ds->depth + 7) >> 3);
-    d = s->ds->data;
+    w = s->scr_width * ((ds_get_bits_per_pixel(s->ds) + 7) >> 3);
+    d = ds_get_data(s->ds);
     for(i = 0; i < s->scr_height; i++) {
         memset(d, 0, w);
-        d += s->ds->linesize;
+        d += ds_get_linesize(s->ds);
     }
 
     dpy_update(s->ds, 0, 0, s->scr_width, s->scr_height);
@@ -485,7 +485,7 @@ static void tc6393xb_update_display(void *opaque)
         s->blanked = s->blank;
         full_update = 1;
     }
-    if (s->scr_width != s->ds->width || s->scr_height != s->ds->height) {
+    if (s->scr_width != ds_get_width(s->ds) || s->scr_height != ds_get_height(s->ds)) {
         qemu_console_resize(s->console, s->scr_width, s->scr_height);
         full_update = 1;
     }