Changeset 7dba813 in mainline for uspace/lib/gui/terminal.c


Ignore:
Timestamp:
2012-11-22T09:03:39Z (11 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba733e83
Parents:
8e6ec6e
Message:

Resolved Ticket #485 (Desktop is slow). GUI is usable in Qemu/non-KVM as long as windows are not transparent, rotated or scaled (i.e. if user limits himself only to translation and resizing).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gui/terminal.c

    r8e6ec6e r7dba813  
    196196        uint16_t glyph = fb_font_glyph(field->ch);
    197197       
    198         // FIXME: This font drawing routine is shamelessly
    199         //        suboptimal. It should be optimized for
    200         //        aligned memory transfers, etc.
    201        
    202198        for (unsigned int y = 0; y < FONT_SCANLINES; y++) {
    203                 for (unsigned int x = 0; x < FONT_WIDTH; x++) {
    204                         pixel_t pixel =
    205                             (fb_font[glyph][y] & (1 << (7 - x))) ? fgcolor : bgcolor;
    206                         surface_put_pixel(surface, bx + x, by + y, pixel);
     199                pixel_t *dst = pixelmap_pixel_at(
     200                    surface_pixmap_access(surface), bx, by + y);
     201                int count = FONT_WIDTH;
     202                while (count-- != 0) {
     203                        *dst++ = (fb_font[glyph][y] & (1 << count)) ? fgcolor : bgcolor;
    207204                }
    208205        }
     206        surface_add_damaged_region(surface, bx, by, FONT_WIDTH, FONT_SCANLINES);
    209207}
    210208
Note: See TracChangeset for help on using the changeset viewer.