[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[2506] 2009-08-18 Pavel Roskin <address@hidden>
From: |
Pavel Roskin |
Subject: |
[2506] 2009-08-18 Pavel Roskin <address@hidden> |
Date: |
Tue, 18 Aug 2009 17:26:36 +0000 |
Revision: 2506
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2506
Author: proski
Date: 2009-08-18 17:26:35 +0000 (Tue, 18 Aug 2009)
Log Message:
-----------
2009-08-18 Pavel Roskin <address@hidden>
* 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.
Modified Paths:
--------------
trunk/grub2/ChangeLog
trunk/grub2/include/grub/fbfill.h
trunk/grub2/include/grub/fbutil.h
trunk/grub2/video/fb/fbutil.c
Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog 2009-08-17 13:44:07 UTC (rev 2505)
+++ trunk/grub2/ChangeLog 2009-08-18 17:26:35 UTC (rev 2506)
@@ -1,3 +1,11 @@
+2009-08-18 Pavel Roskin <address@hidden>
+
+ * 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 <address@hidden>
VBE cleanup.
Modified: trunk/grub2/include/grub/fbfill.h
===================================================================
--- trunk/grub2/include/grub/fbfill.h 2009-08-17 13:44:07 UTC (rev 2505)
+++ trunk/grub2/include/grub/fbfill.h 2009-08-18 17:26:35 UTC (rev 2506)
@@ -44,7 +44,7 @@
/* Pointer to data. Can either be in video card memory or in local host's
memory. */
- void *data;
+ grub_uint8_t *data;
};
void
Modified: trunk/grub2/include/grub/fbutil.h
===================================================================
--- trunk/grub2/include/grub/fbutil.h 2009-08-17 13:44:07 UTC (rev 2505)
+++ trunk/grub2/include/grub/fbutil.h 2009-08-18 17:26:35 UTC (rev 2506)
@@ -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,
Modified: trunk/grub2/video/fb/fbutil.c
===================================================================
--- trunk/grub2/video/fb/fbutil.c 2009-08-17 13:44:07 UTC (rev 2505)
+++ trunk/grub2/video/fb/fbutil.c 2009-08-18 17:26:35 UTC (rev 2506)
@@ -40,28 +40,20 @@
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 @@
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 @@
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);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [2506] 2009-08-18 Pavel Roskin <address@hidden>,
Pavel Roskin <=