Changeset ca645a2 in mainline
- Timestamp:
- 2019-01-02T10:41:50Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7acd787
- Parents:
- e8d3165e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/fb/fb.c
re8d3165e rca645a2 76 76 (instance)->cols + (col)) 77 77 78 #define BB_NEXT_COL(pos) (++(pos)) 79 78 80 #define GLYPH_POS(instance, glyph, y) \ 79 81 ((glyph) * (instance)->glyphbytes + (y) * (instance)->glyphscanline) … … 270 272 unsigned int x; 271 273 unsigned int col; 274 size_t bb_pos = BB_POS(instance, 0, row); 275 size_t bb_pos1 = BB_POS(instance, 0, row + 1); 272 276 273 277 for (col = 0, x = 0; col < instance->cols; … … 276 280 277 281 if (row < instance->rows - 1) { 278 if (instance->backbuf[ BB_POS(instance, col, row)] ==279 instance->backbuf[ BB_POS(instance, col, row + 1)])280 continue;281 282 glyph = instance->backbuf[ BB_POS(instance, col, row + 1)];282 if (instance->backbuf[bb_pos] == 283 instance->backbuf[bb_pos1]) 284 goto skip; 285 286 glyph = instance->backbuf[bb_pos1]; 283 287 } else 284 288 glyph = 0; … … 287 291 &instance->glyphs[GLYPH_POS(instance, glyph, yd)], 288 292 instance->glyphscanline); 293 skip: 294 BB_NEXT_COL(bb_pos); 295 BB_NEXT_COL(bb_pos1); 289 296 } 290 297 } … … 373 380 unsigned int x; 374 381 unsigned int col; 382 size_t bb_pos = BB_POS(instance, 0, row); 375 383 376 384 for (col = 0, x = 0; col < instance->cols; 377 385 col++, x += FONT_WIDTH) { 378 386 uint16_t glyph = 379 instance->backbuf[ BB_POS(instance, col, row)];387 instance->backbuf[bb_pos]; 380 388 void *dst = &instance->addr[FB_POS(instance, x, y + yd)]; 381 389 void *src = &instance->glyphs[GLYPH_POS(instance, glyph, yd)]; 382 390 memcpy(dst, src, instance->glyphscanline); 391 BB_NEXT_COL(bb_pos); 383 392 } 384 393 }
Note:
See TracChangeset
for help on using the changeset viewer.