Changeset e1a27be in mainline for uspace/lib/gui/terminal.c


Ignore:
Timestamp:
2012-12-29T10:48:35Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
17cc8f4f
Parents:
8f88beb (diff), c928bb7 (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

    r8f88beb re1a27be  
    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.