VirtualBox

Changeset 33519 in vbox for trunk/src


Ignore:
Timestamp:
Oct 27, 2010 3:07:55 PM (14 years ago)
Author:
vboxsync
Message:

VGA: Fixed repaint problems caused by taking screenshots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r33511 r33519  
    15961596 * - flashing
    15971597 */
    1598 static int vga_draw_text(VGAState *s, int full_update, bool fFailOnResize)
     1598static int vga_draw_text(VGAState *s, int full_update, bool fFailOnResize, bool reset_dirty)
    15991599{
    16001600    int cx, cy, cheight, cw, ch, cattr, height, width, ch_attr;
     
    17231723                if (cx > cx_max)
    17241724                    cx_max = cx;
    1725                 *ch_attr_ptr = ch_attr;
     1725                if (reset_dirty)
     1726                    *ch_attr_ptr = ch_attr;
    17261727#ifdef WORDS_BIGENDIAN
    17271728                ch = ch_attr >> 8;
     
    19621963 * graphic modes
    19631964 */
    1964 static int vga_draw_graphic(VGAState *s, int full_update, bool fFailOnResize)
     1965static int vga_draw_graphic(VGAState *s, int full_update, bool fFailOnResize, bool reset_dirty)
    19651966{
    19661967    int y1, y2, y, update, page_min, page_max, linesize, y_start, double_scan;
     
    21342135    }
    21352136    /* reset modified pages */
    2136     if (page_max != -1) {
     2137    if (page_max != -1 && reset_dirty) {
    21372138        vga_reset_dirty(s, page_min, page_max + TARGET_PAGE_SIZE);
    21382139    }
     
    21752176#define GMODE_BLANK 2
    21762177
    2177 static int vga_update_display(PVGASTATE s, bool fUpdateAll, bool fFailOnResize)
     2178static int vga_update_display(PVGASTATE s, bool fUpdateAll, bool fFailOnResize, bool reset_dirty)
    21782179{
    21792180    int rc = VINF_SUCCESS;
     
    22292230            if (s->gr[6] & 1) {
    22302231                s->graphic_mode = GMODE_GRAPH;
    2231                 rc = vga_draw_graphic(s, 1, false);
     2232                rc = vga_draw_graphic(s, 1, false, reset_dirty);
    22322233            } else {
    22332234                s->graphic_mode = GMODE_TEXT;
    2234                 rc = vga_draw_text(s, 1, false);
     2235                rc = vga_draw_text(s, 1, false, reset_dirty);
    22352236            }
    22362237
     
    22572258        switch(graphic_mode) {
    22582259        case GMODE_TEXT:
    2259             rc = vga_draw_text(s, full_update, fFailOnResize);
     2260            rc = vga_draw_text(s, full_update, fFailOnResize, reset_dirty);
    22602261            break;
    22612262        case GMODE_GRAPH:
    2262             rc = vga_draw_graphic(s, full_update, fFailOnResize);
     2263            rc = vga_draw_graphic(s, full_update, fFailOnResize, reset_dirty);
    22632264            break;
    22642265        case GMODE_BLANK:
     
    43394340    }
    43404341
    4341     rc = vga_update_display(pThis, false, false);
     4342    rc = vga_update_display(pThis, false, false, true);
    43424343    if (rc != VINF_SUCCESS)
    43434344    {
     
    43674368    pThis->graphic_mode = -1; /* force full update */
    43684369
    4369     return vga_update_display(pThis, true, false);
     4370    return vga_update_display(pThis, true, false, true);
    43704371}
    43714372
     
    45114512             * If there is a pending resize, the function will fail.
    45124513             */
    4513             rc = vga_update_display(pThis, false, true);
     4514            rc = vga_update_display(pThis, false, true, false);
    45144515
    45154516            /* Restore. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette