2009-08-17 Michal Suchanek <hramrach@centrum.cz>
Remove duplicate grub_video_fb_get_video_ptr. * include/grub/fbutil.h (get_data_ptr): Rename to ... (grub_video_fb_get_video_ptr): ... this. * include/grub/video_fb.h (grub_video_fb_get_video_ptr): Removed. * video/fb/fbutil.c: Add comment about addressing. (get_data_ptr): Rename to ... (grub_video_fb_get_video_ptr): ... this. All users updated. * video/fb/video_fb.c (grub_video_fb_get_video_ptr): Remove.
This commit is contained in:
parent
cc8c6fafe9
commit
6025fcd7f9
6 changed files with 61 additions and 79 deletions
|
@ -83,44 +83,6 @@ grub_video_fb_get_info (struct grub_video_mode_info *mode_info)
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
|
||||
grub_uint8_t *
|
||||
grub_video_fb_get_video_ptr (struct grub_video_fbblit_info *source,
|
||||
grub_uint32_t x, grub_uint32_t y)
|
||||
{
|
||||
grub_uint8_t *ptr = 0;
|
||||
|
||||
switch (source->mode_info->bpp)
|
||||
{
|
||||
case 32:
|
||||
ptr = (grub_uint8_t *)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;
|
||||
break;
|
||||
|
||||
case 16:
|
||||
case 15:
|
||||
ptr = (grub_uint8_t *)source->data
|
||||
+ y * source->mode_info->pitch
|
||||
+ x * 2;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
ptr = (grub_uint8_t *)source->data
|
||||
+ y * source->mode_info->pitch
|
||||
+ x;
|
||||
break;
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_video_fb_get_palette (unsigned int start, unsigned int count,
|
||||
struct grub_video_palette_data *palette_data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue