Changes in kernel/genarch/src/fb/fb.c [eb2187c4:888c06e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/fb/fb.c
reb2187c4 r888c06e 267 267 } 268 268 269 /** Scroll screen down by one row270 *271 */272 static void screen_scroll(fb_instance_t *instance)273 {274 if ((!instance->parea.mapped) || (console_override)) {275 for (unsigned int rel_row = 0; rel_row < instance->screen_rows; rel_row++) {276 unsigned int y = ROW2Y(rel_row);277 unsigned int row = rel_row + instance->offset_row;278 279 for (unsigned int yd = 0; yd < FONT_SCANLINES; yd++) {280 unsigned int x;281 unsigned int col;282 size_t bb_pos = BB_POS(instance, 0, row);283 size_t bb_pos1 = BB_POS(instance, 0, row + 1);284 285 for (col = 0, x = 0; col < instance->cols;286 col++, x += FONT_WIDTH) {287 uint16_t glyph;288 289 if (row < instance->rows - 1) {290 if (instance->backbuf[bb_pos] ==291 instance->backbuf[bb_pos1])292 goto skip;293 294 glyph = instance->backbuf[bb_pos1];295 } else296 glyph = 0;297 298 memcpy(&instance->addr[FB_POS(instance, x, y + yd)],299 &instance->glyphs[GLYPH_POS(instance, glyph, yd)],300 instance->glyphscanline);301 skip:302 BB_NEXT_COL(bb_pos);303 BB_NEXT_COL(bb_pos1);304 }305 }306 }307 }308 309 /*310 * Implement backbuffer scrolling by wrapping around311 * the cyclic buffer.312 */313 314 instance->start_row++;315 if (instance->start_row == instance->rows)316 instance->start_row = 0;317 318 memsetw(&instance->backbuf[BB_POS(instance, 0, instance->rows - 1)],319 instance->cols, 0);320 }321 322 269 static void cursor_put(fb_instance_t *instance) 323 270 { … … 418 365 memcpy(&instance->addr[FB_POS(instance, 0, y)], 419 366 instance->bgscan, instance->bgscanbytes); 367 } 368 } 369 370 /** Scroll screen down by one row 371 * 372 */ 373 static void screen_scroll(fb_instance_t *instance) 374 { 375 /* 376 * Implement backbuffer scrolling by wrapping around 377 * the cyclic buffer. 378 */ 379 380 instance->start_row++; 381 if (instance->start_row == instance->rows) 382 instance->start_row = 0; 383 384 if ((!instance->parea.mapped) || (console_override)) { 385 fb_redraw_internal(instance); 420 386 } 421 387 }
Note:
See TracChangeset
for help on using the changeset viewer.