mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 01:29:27 +00:00
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:
1 parent
cc8c6fafe9
commit
6025fcd7f9
6 files changed
+61
-79
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user