]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-08-18 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Tue, 18 Aug 2009 17:26:35 +0000 (17:26 +0000)
committerproski <proski@localhost>
Tue, 18 Aug 2009 17:26:35 +0000 (17:26 +0000)
* include/grub/fbfill.h (struct grub_video_fbrender_target): Use
grub_uint8_t pointer for data.
* include/grub/fbutil.h (struct grub_video_fbblit_info):
Likewise.
* video/fb/fbutil.c: Remove unnecessary casts.

ChangeLog
include/grub/fbfill.h
include/grub/fbutil.h
video/fb/fbutil.c

index b76fe38583cf41f31859fc10e0e6a80544c6ef05..e132a24f35dda6c0ba4729b979e84135fd383810 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-08-18  Pavel Roskin  <proski@gnu.org>
+
+       * include/grub/fbfill.h (struct grub_video_fbrender_target): Use
+       grub_uint8_t pointer for data.
+       * include/grub/fbutil.h (struct grub_video_fbblit_info):
+       Likewise.
+       * video/fb/fbutil.c: Remove unnecessary casts.
+
 2009-08-17  Michal Suchanek  <hramrach@centrum.cz>
 
        VBE cleanup.
index 08cd7b887c2f9babf91904ad88dd3db040191e13..c85fa12ddcee66873f6c3d31bbaac0fd9da0d9a6 100644 (file)
@@ -44,7 +44,7 @@ struct grub_video_fbrender_target
 
   /* Pointer to data.  Can either be in video card memory or in local host's
      memory.  */
-  void *data;
+  grub_uint8_t *data;
 };
 
 void
index cf7ecc0d8c63a5c97b27eab0a4dc59def370704c..065ccf9e3f7ee7f1d67ab51d8939ac817a49995e 100644 (file)
@@ -28,7 +28,7 @@
 struct grub_video_fbblit_info
 {
   struct grub_video_mode_info *mode_info;
-  void *data;
+  grub_uint8_t *data;
 };
 
 grub_uint8_t *grub_video_fb_get_video_ptr (struct grub_video_fbblit_info *source,
index 1fa48ec597430bcba51b2013cb1f86c4b8894a38..511beaafc9c9a12ad952dcc3147f8e803b66f9d6 100644 (file)
@@ -40,28 +40,20 @@ grub_video_fb_get_video_ptr (struct grub_video_fbblit_info *source,
   switch (source->mode_info->bpp)
     {
     case 32:
-      ptr = (grub_uint8_t *)source->data
-            + y * source->mode_info->pitch
-            + x * 4;
+      ptr = source->data + y * source->mode_info->pitch + x * 4;
       break;
 
     case 24:
-      ptr = (grub_uint8_t *)source->data
-            + y * source->mode_info->pitch
-            + x * 3;
+      ptr = source->data + y * source->mode_info->pitch + x * 3;
       break;
 
     case 16:
     case 15:
-      ptr = (grub_uint8_t *)source->data
-            + y * source->mode_info->pitch
-            + x * 2;
+      ptr = source->data + y * source->mode_info->pitch + x * 2;
       break;
 
     case 8:
-      ptr = (grub_uint8_t *)source->data
-            + y * source->mode_info->pitch
-            + x;
+      ptr = source->data + y * source->mode_info->pitch + x;
       break;
 
     case 1:
@@ -107,8 +99,7 @@ get_pixel (struct grub_video_fbblit_info *source,
       if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED)
         {
           int bit_index = y * source->mode_info->width + x;
-          grub_uint8_t *ptr = (grub_uint8_t *)source->data
-                              + bit_index / 8;
+          grub_uint8_t *ptr = source->data + bit_index / 8;
           int bit_pos = 7 - bit_index % 8;
           color = (*ptr >> bit_pos) & 0x01;
         }
@@ -175,8 +166,7 @@ set_pixel (struct grub_video_fbblit_info *source,
       if (source->mode_info->blit_format == GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED)
         {
           int bit_index = y * source->mode_info->width + x;
-          grub_uint8_t *ptr = (grub_uint8_t *)source->data
-                              + bit_index / 8;
+          grub_uint8_t *ptr = source->data + bit_index / 8;
           int bit_pos = 7 - bit_index % 8;
           *ptr = (*ptr & ~(1 << bit_pos)) | ((color & 0x01) << bit_pos);
         }