Changeset 7dba813 in mainline for uspace/lib/gui/terminal.c
- Timestamp:
- 2012-11-22T09:03:39Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ba733e83
- Parents:
- 8e6ec6e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gui/terminal.c
r8e6ec6e r7dba813 196 196 uint16_t glyph = fb_font_glyph(field->ch); 197 197 198 // FIXME: This font drawing routine is shamelessly199 // suboptimal. It should be optimized for200 // aligned memory transfers, etc.201 202 198 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; 207 204 } 208 205 } 206 surface_add_damaged_region(surface, bx, by, FONT_WIDTH, FONT_SCANLINES); 209 207 } 210 208
Note:
See TracChangeset
for help on using the changeset viewer.