Changeset 4a62ec9 in mainline for uspace/srv/fb/fb.c
- Timestamp:
- 2009-01-09T21:53:36Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 42ec919
- Parents:
- 7447572
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fb/fb.c
r7447572 r4a62ec9 186 186 }; 187 187 188 static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a); 188 189 static int rgb_from_style(attr_rgb_t *rgb, int style); 189 190 static int rgb_from_idx(attr_rgb_t *rgb, ipcarg_t fg_color, … … 878 879 uint8_t glyph = bbp->glyph; 879 880 880 if (glyph != data[i].character) { 881 bbp->glyph = data[i].character; 882 a = &data[i].attrs; 883 884 switch (a->t) { 885 case at_style: 886 rgb_from_style(&rgb, a->a.s.style); 887 break; 888 case at_idx: 889 rgb_from_idx(&rgb, a->a.i.fg_color, 890 a->a.i.bg_color, a->a.i.flags); 891 break; 892 case at_rgb: 893 rgb = a->a.r; 894 break; 895 } 881 a = &data[i].attrs; 882 rgb_from_attr(&rgb, a); 883 884 if (glyph != data[i].character || 885 rgb.fg_color != bbp->fg_color || 886 rgb.bg_color != bbp->bg_color) { 887 bbp->glyph = data[i].character; 896 888 897 889 bbp->fg_color = rgb.fg_color; … … 1443 1435 1444 1436 return EOK; 1437 } 1438 1439 static int rgb_from_attr(attr_rgb_t *rgb, const attrs_t *a) 1440 { 1441 int rc; 1442 1443 switch (a->t) { 1444 case at_style: 1445 rc = rgb_from_style(rgb, a->a.s.style); 1446 break; 1447 case at_idx: 1448 rc = rgb_from_idx(rgb, a->a.i.fg_color, 1449 a->a.i.bg_color, a->a.i.flags); 1450 break; 1451 case at_rgb: 1452 *rgb = a->a.r; 1453 rc = EOK; 1454 break; 1455 } 1456 1457 return rc; 1445 1458 } 1446 1459
Note:
See TracChangeset
for help on using the changeset viewer.