grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] Background support for gfxterm and improved scrolling performanc


From: Vesa Jääskeläinen
Subject: [patch] Background support for gfxterm and improved scrolling performance.
Date: Sun, 30 Dec 2007 18:52:55 +0200
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Hi All,

Here is a patch that adds background image support to gfxterm. At same
time I added some small optimizations that didn't need any extra memory.
I also added some new commands to video subsystem interface to make it
more easier to use it.

There are still some issues about saving and restoring state for video
adapter that I think should be added but are still not there. Eg. trying
different adapter/mode that is not working correctly and then restoring
back to working configuration.

This patch should also fix Robert's problem with menu colors.

To make it absolute clear this patch does NOT make graphical menu, it is
just to meet demands for background image support while waiting for the
implementation ;).

Usage:

insmod video
insmod vbe
insmod gfxterm
insmod tga

terminal gfxterm

background_image <your tga file>

Thanks,
Vesa Jääskeläinen
Index: ChangeLog
===================================================================
RCS file: /sources/grub/grub2/ChangeLog,v
retrieving revision 1.461
diff -u -p -1 -r1.461 ChangeLog
--- ChangeLog   30 Dec 2007 08:49:56 -0000      1.461
+++ ChangeLog   30 Dec 2007 16:41:18 -0000
@@ -1 +1,52 @@
+2007-12-30  Vesa Jaaskelainen  <address@hidden>
+
+       * include/grub/video.h: Added grub_video_unmap_color and 
+       grub_video_get_active_render_target.
+       (grub_video_adapter): Added unmap_color and get_active_render_target.
+
+       * video/video.c: Added grub_video_unmap_color and 
+       grub_video_get_active_render_target.
+       (grub_video_get_info): Changed method to accept NULL pointer as an
+       argument to allow detection of active video adapter.
+
+       * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
+       grub_video_vbe_unmap_color_int.
+       Added grub_video_vbe_unmap_color and
+       grub_video_vbe_get_active_render_target.
+       (grub_video_vbe_adapter): Added unmap_color and
+       get_active_render_target.
+
+       * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage 
+       with grub_video_vbe_unmap_color_int.
+
+       * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
+       (DEFAULT_NORMAL_COLOR): Likewise.
+       (DEFAULT_HIGHLIGHT_COLOR) Likewise.
+       (DEFAULT_FG_COLOR): Removed.
+       (DEFAULT_BG_COLOR): Likewise.
+       (DEFAULT_CURSOR_COLOR): Changed value.
+       (grub_virtual_screen): Added standard_color_setting,
+       normal_color_setting, highlight_color_setting and term_color.
+       (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
+       (bitmap_width): Added.
+       (bitmap_height): Likewise.
+       (bitmap): Likewise.
+       (set_term_color): Likewise.
+       (grub_virtual_screen_setup): Changed to use new terminal coloring
+       settings.
+       (grub_gfxterm_init): Added init for bitmap.
+       (grub_gfxterm_fini): Added destroy for bitmap.
+       (redraw_screen_rect): Updated to use background bitmap and new
+       terminal coloring.
+       (scroll_up): Added optimization for case when there is no bitmap.
+       (grub_gfxterm_cls): Fixed to use correct background color.
+       (grub_virtual_screen_setcolorstate): Changed to use new terminal
+       coloring.
+       (grub_virtual_screen_setcolor): Likewise.
+       (grub_virtual_screen_getcolor): Added.
+       (grub_gfxterm_background_image_cmd): Likewise.
+       (grub_video_term): Added setcolor and getcolor.
+       (MOD_INIT): Added registration of background_image command.
+       (MOD_TERM): Added unregistration for background_image command.
+
 2007-12-30  Pavel Roskin  <address@hidden>
Index: include/grub/video.h
===================================================================
RCS file: /sources/grub/grub2/include/grub/video.h,v
retrieving revision 1.7
diff -u -p -1 -r1.7 video.h
--- include/grub/video.h        30 Dec 2007 08:52:03 -0000      1.7
+++ include/grub/video.h        30 Dec 2007 16:41:18 -0000
@@ -175,2 +175,6 @@ struct grub_video_adapter
 
+  grub_err_t (*unmap_color) (grub_video_color_t color,
+                             grub_uint8_t *red, grub_uint8_t *green,
+                             grub_uint8_t *blue, grub_uint8_t *alpha);
+
   grub_err_t (*fill_rect) (grub_video_color_t color, int x, int y,
@@ -203,2 +207,4 @@ struct grub_video_adapter
 
+  grub_err_t (*get_active_render_target) (struct grub_video_render_target 
**target);
+
   /* The next video adapter.  */
@@ -241,2 +247,6 @@ grub_video_color_t grub_video_map_rgba (
 
+grub_err_t grub_video_unmap_color (grub_video_color_t color,
+                                   grub_uint8_t *red, grub_uint8_t *green,
+                                   grub_uint8_t *blue, grub_uint8_t *alpha);
+
 grub_err_t grub_video_fill_rect (grub_video_color_t color, int x, int y,
@@ -272,2 +282,4 @@ grub_err_t grub_video_set_active_render_
 
+grub_err_t grub_video_get_active_render_target (struct 
grub_video_render_target **target);
+
 #endif /* ! GRUB_VIDEO_HEADER */
Index: include/grub/i386/pc/vbe.h
===================================================================
RCS file: /sources/grub/grub2/include/grub/i386/pc/vbe.h,v
retrieving revision 1.9
diff -u -p -1 -r1.9 vbe.h
--- include/grub/i386/pc/vbe.h  30 Dec 2007 08:52:04 -0000      1.9
+++ include/grub/i386/pc/vbe.h  30 Dec 2007 16:41:18 -0000
@@ -242,6 +242,14 @@ grub_video_color_t grub_video_vbe_map_rg
 
-void grub_video_vbe_unmap_color (struct grub_video_i386_vbeblit_info *source,
-                                 grub_video_color_t color, grub_uint8_t *red,
-                                 grub_uint8_t *green, grub_uint8_t *blue,
-                                 grub_uint8_t *alpha);
+grub_err_t grub_video_vbe_unmap_color (grub_video_color_t color,
+                                       grub_uint8_t *red,
+                                       grub_uint8_t *green,
+                                       grub_uint8_t *blue,
+                                       grub_uint8_t *alpha);
+
+void grub_video_vbe_unmap_color_int (struct grub_video_i386_vbeblit_info 
*source,
+                                     grub_video_color_t color,
+                                     grub_uint8_t *red,
+                                     grub_uint8_t *green,
+                                     grub_uint8_t *blue,
+                                     grub_uint8_t *alpha);
 
Index: term/gfxterm.c
===================================================================
RCS file: /sources/grub/grub2/term/gfxterm.c,v
retrieving revision 1.8
diff -u -p -1 -r1.8 gfxterm.c
--- term/gfxterm.c      30 Dec 2007 08:52:05 -0000      1.8
+++ term/gfxterm.c      30 Dec 2007 16:41:19 -0000
@@ -30,2 +30,3 @@
 #include <grub/video.h>
+#include <grub/bitmap.h>
 
@@ -40,5 +41,6 @@
 
-#define DEFAULT_FG_COLOR       0x0a
-#define DEFAULT_BG_COLOR       0x00
-#define DEFAULT_CURSOR_COLOR   0x0f
+#define DEFAULT_STANDARD_COLOR  0x07
+#define DEFAULT_NORMAL_COLOR    0x07
+#define DEFAULT_HIGHLIGHT_COLOR 0x70
+#define DEFAULT_CURSOR_COLOR   0x07
 
@@ -91,5 +93,9 @@ struct grub_virtual_screen
 
+  /* Terminal color settings.  */
+  grub_uint8_t standard_color_setting;
+  grub_uint8_t normal_color_setting;
+  grub_uint8_t highlight_color_setting;
+  grub_uint8_t term_color;
+  
   /* Color settings.  */
-  grub_video_color_t fg_color_setting;
-  grub_video_color_t bg_color_setting;
   grub_video_color_t fg_color;
@@ -110,2 +116,6 @@ static struct grub_video_render_target *
 
+static unsigned int bitmap_width;
+static unsigned int bitmap_height;
+static struct grub_video_bitmap *bitmap;
+
 static struct grub_dirty_region dirty_region;
@@ -120,2 +130,28 @@ static void dirty_region_add (int x, int
 static void
+set_term_color (grub_uint8_t term_color)
+{
+  struct grub_video_render_target *old_target;
+
+  /* Save previous target and switch to text layer.  */
+  grub_video_get_active_render_target (&old_target);
+  grub_video_set_active_render_target (text_layer);
+
+  /* Map terminal color to text layer compatible video colors.  */
+  virtual_screen.fg_color = grub_video_map_color(term_color & 0x0f);
+  
+  /* Special case: use black as transparent color.  */
+  if (((term_color >> 4) & 0x0f) == 0)
+    {
+      virtual_screen.bg_color = grub_video_map_rgba(0, 0, 0, 0);
+    } 
+  else
+    {
+      virtual_screen.bg_color = grub_video_map_color((term_color >> 4) & 0x0f);
+    }
+
+  /* Restore previous target.  */
+  grub_video_set_active_render_target (old_target);
+}
+
+static void
 grub_virtual_screen_free (void)
@@ -177,6 +213,10 @@ grub_virtual_screen_setup (unsigned int 
 
-  virtual_screen.fg_color_setting = grub_video_map_color (DEFAULT_FG_COLOR);
-  virtual_screen.bg_color_setting = grub_video_map_color (DEFAULT_BG_COLOR);
-  virtual_screen.fg_color = virtual_screen.fg_color_setting;
-  virtual_screen.bg_color = virtual_screen.bg_color_setting;
+  virtual_screen.standard_color_setting = DEFAULT_STANDARD_COLOR;
+  virtual_screen.normal_color_setting = DEFAULT_NORMAL_COLOR;
+  virtual_screen.highlight_color_setting = DEFAULT_HIGHLIGHT_COLOR;
+  
+  virtual_screen.term_color = virtual_screen.normal_color_setting;
+  
+  set_term_color (virtual_screen.term_color);
+
   virtual_screen.cursor_color = grub_video_map_color (DEFAULT_CURSOR_COLOR);
@@ -429,2 +469,3 @@ grub_gfxterm_init (void)
   grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
+  bitmap = 0;
 
@@ -452,2 +493,8 @@ grub_gfxterm_fini (void)
 {
+  if (bitmap)
+    {
+      grub_video_bitmap_destroy (bitmap);
+      bitmap = 0;
+    }
+
   grub_virtual_screen_free ();
@@ -467,11 +514,68 @@ redraw_screen_rect (unsigned int x, unsi
 
-  /* Render background layer.  */
-  color = virtual_screen.bg_color;
-  grub_video_fill_rect (color, x, y, width, height);
 
-  /* Render text layer.  */
-  grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_BLEND, x, y,
-                                 x - virtual_screen.offset_x,
-                                 y - virtual_screen.offset_y,
-                                 width, height);
+  if (bitmap)
+    {
+      /* Render bitmap as background.  */
+      grub_video_blit_bitmap (bitmap, GRUB_VIDEO_BLIT_REPLACE, x, y, 
+                              x, y, 
+                              width, height);
+      
+      /* If bitmap is smaller than requested blit area, use background 
+         color.  */
+      color = virtual_screen.bg_color;
+
+      /* Fill right side of the bitmap if needed.  */
+      if ((x + width >= bitmap_width) && (y < bitmap_height))
+        {
+          int w = (x + width) - bitmap_width;
+          int h = height;
+          unsigned int tx = x;
+
+          if (y + height >= bitmap_height)
+            {
+              h = bitmap_height - y;
+            }
+          
+          if (bitmap_width > tx)
+            {
+              tx = bitmap_width;
+            }
+          
+          /* Render background layer.  */
+          grub_video_fill_rect (color, tx, y, w, h);        
+        }
+      
+      /* Fill bottom side of the bitmap if needed.  */
+      if (y + height >= bitmap_height)
+        {
+          int h = (y + height) - bitmap_height;
+          unsigned int ty = y;
+          
+          if (bitmap_height > ty)
+            {
+              ty = bitmap_height;
+            }
+          
+          /* Render background layer.  */
+          grub_video_fill_rect (color, x, ty, width, h);        
+        }
+
+      /* Render text layer as blended.  */
+      grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_BLEND, x, y,
+                                     x - virtual_screen.offset_x,
+                                     y - virtual_screen.offset_y,
+                                     width, height);
+    }
+  else
+    {
+      /* Render background layer.  */
+      color = virtual_screen.bg_color;
+      grub_video_fill_rect (color, x, y, width, height);
+
+      /* Render text layer as replaced (to get texts background color).  */
+      grub_video_blit_render_target (text_layer, GRUB_VIDEO_BLIT_REPLACE, x, y,
+                                     x - virtual_screen.offset_x,
+                                     y - virtual_screen.offset_y,
+                                     width, height);      
+    }
 }
@@ -625,2 +729,12 @@ scroll_up (void)
 
+  /* If we don't have background bitmap, remove cursor. */
+  if (!bitmap)
+    {
+      /* Remove cursor.  */
+      write_char ();
+
+      /* Redraw only changed regions.  */
+      dirty_region_redraw ();
+    }
+  
   /* Scroll text buffer with one line to up.  */
@@ -649,5 +763,23 @@ scroll_up (void)
   grub_video_set_active_render_target (GRUB_VIDEO_RENDER_TARGET_DISPLAY);
+  
+  /* If we have bitmap, re-draw screen, otherwise scroll physical screen too.  
*/
+  if (bitmap)
+    {
+      /* Mark virtual screen to be redrawn.  */
+      dirty_region_add_virtualscreen ();
+    }
+  else
+    {      
+      /* Clear new border area.  */
+      grub_video_fill_rect (color, 
+                            virtual_screen.offset_x, virtual_screen.offset_y, 
+                            virtual_screen.width, virtual_screen.char_height);
+      
+      /* Scroll physical screen.  */
+      grub_video_scroll (color, 0, -virtual_screen.char_height);      
 
-  /* Mark virtual screen to be redrawn.  */
-  dirty_region_add_virtualscreen ();
+      /* Draw cursor if visible.  */
+      if (virtual_screen.cursor_state)
+        write_cursor ();
+    }
 }
@@ -814,3 +946,3 @@ grub_gfxterm_cls (void)
   grub_video_set_active_render_target (text_layer);
-  color = virtual_screen.bg_color_setting;
+  color = virtual_screen.bg_color;
   grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
@@ -828,10 +960,13 @@ grub_virtual_screen_setcolorstate (grub_
     case GRUB_TERM_COLOR_STANDARD:
+      virtual_screen.term_color = virtual_screen.standard_color_setting;
+      break;
+      
     case GRUB_TERM_COLOR_NORMAL:
-      virtual_screen.fg_color = virtual_screen.fg_color_setting;
-      virtual_screen.bg_color = virtual_screen.bg_color_setting;
+      virtual_screen.term_color = virtual_screen.normal_color_setting;
       break;
+      
     case GRUB_TERM_COLOR_HIGHLIGHT:
-      virtual_screen.fg_color = virtual_screen.bg_color_setting;
-      virtual_screen.bg_color = virtual_screen.fg_color_setting;
+      virtual_screen.term_color = virtual_screen.highlight_color_setting;
       break;
+      
     default:
@@ -839,2 +974,21 @@ grub_virtual_screen_setcolorstate (grub_
     }
+
+  /* Change color to virtual terminal.  */
+  set_term_color (virtual_screen.term_color);
+}
+
+static void
+grub_virtual_screen_setcolor (grub_uint8_t normal_color,
+                              grub_uint8_t highlight_color)
+{
+  virtual_screen.normal_color_setting = normal_color;
+  virtual_screen.highlight_color_setting = highlight_color;
+}
+
+static void
+grub_virtual_screen_getcolor (grub_uint8_t *normal_color,
+                              grub_uint8_t *highlight_color)
+{
+  *normal_color = virtual_screen.normal_color_setting;
+  *highlight_color = virtual_screen.highlight_color_setting;
 }
@@ -862,2 +1016,48 @@ grub_gfxterm_refresh (void)
 
+static grub_err_t
+grub_gfxterm_background_image_cmd (struct grub_arg_list *state __attribute__ 
((unused)),
+                                   int argc,
+                                   char **args)
+{
+  /* Check that we have video adapter active.  */
+  if (grub_video_get_info(NULL) != GRUB_ERR_NONE)
+    return grub_errno;
+  
+  /* Destroy existing background bitmap if loaded.  */
+  if (bitmap)
+    {
+      grub_video_bitmap_destroy (bitmap);
+      bitmap = 0;
+      
+      /* Mark whole screen as dirty.  */
+      dirty_region_reset ();
+      dirty_region_add (0, 0, mode_info.width, mode_info.height);
+    }
+
+  /* If filename was provided, try to load that.  */
+  if (argc >= 1)
+    {
+    /* Try to load new one.  */
+    grub_video_bitmap_load (&bitmap, args[0]);    
+    if (grub_errno != GRUB_ERR_NONE)
+      return grub_errno;
+
+    /* If bitmap was loaded correctly, display it.  */
+    if (bitmap)
+      {
+        /* Determine bitmap dimensions.  */
+        bitmap_width = grub_video_bitmap_get_width (bitmap);
+        bitmap_height = grub_video_bitmap_get_width (bitmap);
+        
+        /* Mark whole screen as dirty.  */
+        dirty_region_reset ();
+        dirty_region_add (0, 0, mode_info.width, mode_info.height);
+      }
+    }
+  
+  /* All was ok.  */
+  grub_errno = GRUB_ERR_NONE;
+  return grub_errno;
+}
+
 static struct grub_term grub_video_term =
@@ -876,2 +1076,4 @@ static struct grub_term grub_video_term 
     .setcolorstate = grub_virtual_screen_setcolorstate,
+    .setcolor = grub_virtual_screen_setcolor,
+    .getcolor = grub_virtual_screen_getcolor,
     .setcursor = grub_gfxterm_setcursor,
@@ -886,2 +1088,9 @@ GRUB_MOD_INIT(term_gfxterm)
   grub_term_register (&grub_video_term);
+
+  grub_register_command ("background_image",
+                         grub_gfxterm_background_image_cmd,
+                         GRUB_COMMAND_FLAG_BOTH,
+                         "background_image",
+                         "Load background image for active terminal",
+                         0);
 }
@@ -890,2 +1099,3 @@ GRUB_MOD_FINI(term_gfxterm)
 {
+  grub_unregister_command ("bgimage");
   grub_term_unregister (&grub_video_term);
Index: video/video.c
===================================================================
RCS file: /sources/grub/grub2/video/video.c,v
retrieving revision 1.6
diff -u -p -1 -r1.6 video.c
--- video/video.c       30 Dec 2007 08:52:06 -0000      1.6
+++ video/video.c       30 Dec 2007 16:41:19 -0000
@@ -136,2 +136,9 @@ grub_video_get_info (struct grub_video_m
 
+  /* If mode_info is NULL just report that video adapter is active.  */
+  if (! mode_info)
+    {
+      grub_errno = GRUB_ERR_NONE;
+      return grub_errno;
+    }
+  
   return grub_video_adapter_active->get_info (mode_info);
@@ -262,2 +269,18 @@ grub_video_map_rgba (grub_uint8_t red, g
 
+/* Unmap video color back to RGBA components.  */
+grub_err_t
+grub_video_unmap_color (grub_video_color_t color, grub_uint8_t *red, 
+                        grub_uint8_t *green, grub_uint8_t *blue, 
+                        grub_uint8_t *alpha)
+{
+  if (! grub_video_adapter_active)
+    return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
+
+  return grub_video_adapter_active->unmap_color (color,
+                                                 red,
+                                                 green,
+                                                 blue,
+                                                 alpha);
+}
+
 /* Fill rectangle using specified color.  */
@@ -368,2 +391,12 @@ grub_video_set_active_render_target (str
 
+/* Get active render target.  */
+grub_err_t
+grub_video_get_active_render_target (struct grub_video_render_target **target)
+{
+  if (! grub_video_adapter_active)
+    return grub_error (GRUB_ERR_BAD_DEVICE, "No video mode activated");
+
+  return grub_video_adapter_active->get_active_render_target (target);
+}
+
 /* Initialize Video API module.  */
Index: video/i386/pc/vbe.c
===================================================================
RCS file: /sources/grub/grub2/video/i386/pc/vbe.c,v
retrieving revision 1.12
diff -u -p -1 -r1.12 vbe.c
--- video/i386/pc/vbe.c 30 Dec 2007 08:52:06 -0000      1.12
+++ video/i386/pc/vbe.c 30 Dec 2007 16:41:19 -0000
@@ -756,7 +756,21 @@ grub_video_vbe_map_rgba (grub_uint8_t re
 
+grub_err_t grub_video_vbe_unmap_color (grub_video_color_t color,
+                                       grub_uint8_t *red, grub_uint8_t *green,
+                                       grub_uint8_t *blue, grub_uint8_t *alpha)
+{
+  struct grub_video_i386_vbeblit_info target_info;
+
+  target_info.mode_info = &render_target->mode_info;
+  target_info.data = render_target->data;
+
+  grub_video_vbe_unmap_color_int (&target_info, color, red, green, blue, 
alpha);
+  
+  return GRUB_ERR_NONE;
+}
+
 void
-grub_video_vbe_unmap_color (struct grub_video_i386_vbeblit_info * source,
-                            grub_video_color_t color,
-                            grub_uint8_t *red, grub_uint8_t *green,
-                            grub_uint8_t *blue, grub_uint8_t *alpha)
+grub_video_vbe_unmap_color_int (struct grub_video_i386_vbeblit_info * source,
+                                grub_video_color_t color,
+                                grub_uint8_t *red, grub_uint8_t *green,
+                                grub_uint8_t *blue, grub_uint8_t *alpha)
 {
@@ -1512,2 +1526,10 @@ grub_video_vbe_set_active_render_target 
 
+static grub_err_t
+grub_video_vbe_get_active_render_target (struct grub_video_render_target 
**target)
+{
+  *target = render_target;
+  
+  return GRUB_ERR_NONE;
+}
+
 static struct grub_video_adapter grub_video_vbe_adapter =
@@ -1527,2 +1549,3 @@ static struct grub_video_adapter grub_vi
     .map_rgba = grub_video_vbe_map_rgba,
+    .unmap_color = grub_video_vbe_unmap_color,
     .fill_rect = grub_video_vbe_fill_rect,
@@ -1536,2 +1559,3 @@ static struct grub_video_adapter grub_vi
     .set_active_render_target = grub_video_vbe_set_active_render_target,
+    .get_active_render_target = grub_video_vbe_get_active_render_target,
 
Index: video/i386/pc/vbeblit.c
===================================================================
RCS file: /sources/grub/grub2/video/i386/pc/vbeblit.c,v
retrieving revision 1.4
diff -u -p -1 -r1.4 vbeblit.c
--- video/i386/pc/vbeblit.c     21 Jul 2007 23:32:32 -0000      1.4
+++ video/i386/pc/vbeblit.c     30 Dec 2007 16:41:19 -0000
@@ -283,3 +283,3 @@ grub_video_i386_vbeblit_index_R8G8B8A8 (
 
-          grub_video_vbe_unmap_color (dst, *dstptr, &dr, &dg, &db, &da);
+          grub_video_vbe_unmap_color_int (dst, *dstptr, &dr, &dg, &db, &da);
 
@@ -483,3 +483,3 @@ grub_video_i386_vbeblit_blend (struct gr
           src_color = get_pixel (src, i + offset_x, j + offset_y);
-          grub_video_vbe_unmap_color (src, src_color, &src_red, &src_green,
+          grub_video_vbe_unmap_color_int (src, src_color, &src_red, &src_green,
                                       &src_blue, &src_alpha);
@@ -499,3 +499,3 @@ grub_video_i386_vbeblit_blend (struct gr
 
-          grub_video_vbe_unmap_color (dst, dst_color, &dst_red,
+          grub_video_vbe_unmap_color_int (dst, dst_color, &dst_red,
                                       &dst_green, &dst_blue, &dst_alpha);
@@ -541,3 +541,3 @@ grub_video_i386_vbeblit_replace (struct 
       src_color = get_pixel (src, i + offset_x, j + offset_y);
-      grub_video_vbe_unmap_color (src, src_color, &src_red, &src_green,
+      grub_video_vbe_unmap_color_int (src, src_color, &src_red, &src_green,
                                   &src_blue, &src_alpha);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]