merge trunk
This commit is contained in:
commit
1eb44ae37e
301 changed files with 8465 additions and 1449 deletions
|
@ -31,6 +31,8 @@
|
|||
#include <grub/bitmap_scale.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
#define DEFAULT_VIDEO_MODE "auto"
|
||||
#define DEFAULT_BORDER_WIDTH 10
|
||||
|
||||
|
@ -344,8 +346,6 @@ grub_gfxterm_fullscreen (void)
|
|||
grub_video_swap_buffers ();
|
||||
grub_video_fill_rect (color, 0, 0, mode_info.width, mode_info.height);
|
||||
}
|
||||
bitmap = 0;
|
||||
blend_text_bg = 0;
|
||||
|
||||
/* Select the font to use. */
|
||||
font_name = grub_env_get ("gfxterm_font");
|
||||
|
@ -394,13 +394,6 @@ grub_gfxterm_term_init (struct grub_term_output *term __attribute__ ((unused)))
|
|||
static void
|
||||
destroy_window (void)
|
||||
{
|
||||
if (bitmap)
|
||||
{
|
||||
grub_video_bitmap_destroy (bitmap);
|
||||
bitmap = 0;
|
||||
blend_text_bg = 0;
|
||||
}
|
||||
|
||||
repaint_callback = 0;
|
||||
grub_virtual_screen_free ();
|
||||
}
|
||||
|
@ -536,31 +529,8 @@ dirty_region_is_empty (void)
|
|||
}
|
||||
|
||||
static void
|
||||
dirty_region_add (int x, int y, unsigned int width, unsigned int height)
|
||||
dirty_region_add_real (int x, int y, unsigned int width, unsigned int height)
|
||||
{
|
||||
if ((width == 0) || (height == 0))
|
||||
return;
|
||||
|
||||
if (repaint_scheduled)
|
||||
{
|
||||
if (x > (int)virtual_screen.offset_x)
|
||||
{
|
||||
width += virtual_screen.offset_x - x;
|
||||
x = virtual_screen.offset_x;
|
||||
}
|
||||
if (y > (int)virtual_screen.offset_y)
|
||||
{
|
||||
height += virtual_screen.offset_y - y;
|
||||
y = virtual_screen.offset_y;
|
||||
}
|
||||
if (width < virtual_screen.width)
|
||||
width = virtual_screen.width;
|
||||
if (height < virtual_screen.height)
|
||||
height = virtual_screen.height;
|
||||
repaint_scheduled = 0;
|
||||
repaint_was_scheduled = 1;
|
||||
}
|
||||
|
||||
if (dirty_region_is_empty ())
|
||||
{
|
||||
dirty_region.top_left_x = x;
|
||||
|
@ -581,6 +551,22 @@ dirty_region_add (int x, int y, unsigned int width, unsigned int height)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dirty_region_add (int x, int y, unsigned int width, unsigned int height)
|
||||
{
|
||||
if ((width == 0) || (height == 0))
|
||||
return;
|
||||
|
||||
if (repaint_scheduled)
|
||||
{
|
||||
dirty_region_add_real (virtual_screen.offset_x, virtual_screen.offset_y,
|
||||
virtual_screen.width, virtual_screen.height);
|
||||
repaint_scheduled = 0;
|
||||
repaint_was_scheduled = 1;
|
||||
}
|
||||
dirty_region_add_real (x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
dirty_region_add_virtualscreen (void)
|
||||
{
|
||||
|
@ -959,6 +945,8 @@ calculate_normal_character_width (grub_font_t font)
|
|||
if (glyph->device_width > width)
|
||||
width = glyph->device_width;
|
||||
}
|
||||
if (!width)
|
||||
return 8;
|
||||
|
||||
return width;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue