VirtualBox

Changeset 32950 in vbox for trunk/src/VBox/Devices/Graphics


Ignore:
Timestamp:
Oct 6, 2010 2:45:30 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66447
Message:

VGA: Merge pfnUpdateRect calls for text modes, too.

File:
1 edited

Legend:

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

    r32902 r32950  
    17941794    int cx, cy, cheight, cw, ch, cattr, height, width, ch_attr;
    17951795    int cx_min, cx_max, linesize, x_incr;
     1796    int cx_min_upd, cx_max_upd, cy_start;
    17961797    uint32_t offset, fgcol, bgcol, v, cursor_offset;
    17971798    uint8_t *d1, *d, *src, *s1, *dest, *cursor_ptr;
     
    19421943#endif /* VBOX */
    19431944    ch_attr_ptr = s->last_ch_attr;
     1945    cy_start = -1;
     1946    cx_max_upd = -1;
     1947    cx_min_upd = width;
    19441948
    19451949    for(cy = 0; cy < height; cy++) {
     
    20142018        }
    20152019#else
    2016         if (cx_max != -1)
    2017             s->pDrv->pfnUpdateRect(s->pDrv, cx_min * cw, cy * cheight, (cx_max - cx_min + 1) * cw, cheight);
     2020        if (cx_max != -1) {
     2021            /* Keep track of the bounding rectangle for updates. */
     2022            if (cy_start == -1)
     2023                cy_start = cy;
     2024            if (cx_min_upd > cx_min)
     2025                cx_min_upd = cx_min;
     2026            if (cx_max_upd < cx_max)
     2027                cx_max_upd = cx_max;
     2028        } else if (cy_start >= 0)
     2029            /* Flush updates to display. */
     2030            s->pDrv->pfnUpdateRect(s->pDrv, cx_min_upd * cw, cy_start * cheight,
     2031                                   (cx_max_upd - cx_min_upd + 1) * cw, (cy - cy_start) * cheight);
    20182032#endif
    20192033        dest += linesize * cheight;
     
    20212035    }
    20222036#ifdef VBOX
     2037    if (cy_start >= 0)
     2038        /* Flush any remaining changes to display. */
     2039        s->pDrv->pfnUpdateRect(s->pDrv, cx_min_upd * cw, cy_start * cheight,
     2040                               (cx_max_upd - cx_min_upd + 1) * cw, (cy - cy_start) * cheight);
    20232041        return VINF_SUCCESS;
    20242042#endif /* VBOX */
Note: See TracChangeset for help on using the changeset viewer.

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