Ignore:
File:
1 edited

Legend:

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

    rba733e83 r5d94b16c  
    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       
    198202        for (unsigned int y = 0; y < FONT_SCANLINES; y++) {
    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;
     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);
    207207                }
    208208        }
    209         surface_add_damaged_region(surface, bx, by, FONT_WIDTH, FONT_SCANLINES);
    210209}
    211210
Note: See TracChangeset for help on using the changeset viewer.