From ed5587afea4da065b2857906cacde451818c0e82 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 29 Mar 2011 08:33:28 +0200 Subject: [PATCH] * grub-core/term/gfxterm.c (dirty_region_add): Move core part to ... (dirty_region_add_real): ... this. (dirty_region_add): Don't discard margin refresh when performing scheduled repaint. --- ChangeLog | 7 +++++++ grub-core/term/gfxterm.c | 31 +++++++++++++++++-------------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index a07eff722..c353b8fea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-03-29 Vladimir Serbinenko + + * grub-core/term/gfxterm.c (dirty_region_add): Move core part to ... + (dirty_region_add_real): ... this. + (dirty_region_add): Don't discard margin refresh when performing + scheduled repaint. + 2011-03-29 Vladimir Serbinenko * grub-core/lib/relocator.c (allocate_regstart) diff --git a/grub-core/term/gfxterm.c b/grub-core/term/gfxterm.c index 321479e0a..44d1a9be8 100644 --- a/grub-core/term/gfxterm.c +++ b/grub-core/term/gfxterm.c @@ -532,21 +532,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) - { - x = virtual_screen.offset_x; - y = virtual_screen.offset_y; - width = virtual_screen.width; - height = virtual_screen.height; - repaint_scheduled = 0; - repaint_was_scheduled = 1; - } - if (dirty_region_is_empty ()) { dirty_region.top_left_x = x; @@ -567,6 +554,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) {