Changeset 850235d in mainline for uspace/lib/gui/terminal.c


Ignore:
Timestamp:
2013-03-10T14:56:21Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
05bab88
Parents:
ea906c29 (diff), 2277e03 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    rea906c29 r850235d  
    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                pixel_t *dst_max = pixelmap_pixel_at(
     202                    surface_pixmap_access(surface), bx + FONT_WIDTH - 1, by + y);
     203                if (!dst || !dst_max) continue;
     204                int count = FONT_WIDTH;
     205                while (count-- != 0) {
     206                        *dst++ = (fb_font[glyph][y] & (1 << count)) ? fgcolor : bgcolor;
    207207                }
    208208        }
     209        surface_add_damaged_region(surface, bx, by, FONT_WIDTH, FONT_SCANLINES);
    209210}
    210211
Note: See TracChangeset for help on using the changeset viewer.