Changeset 74d1d66 in mainline


Ignore:
Timestamp:
2006-05-13T17:20:27Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2666daa
Parents:
e459f12
Message:

Forgotten in last commit… improve frame buffer speed by buffering blank line.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • genarch/src/fb/fb.c

    re459f12 r74d1d66  
    3131#include <console/chardev.h>
    3232#include <console/console.h>
     33#include <mm/slab.h>
    3334#include <panic.h>
    3435#include <memstr.h>
     36#include <config.h>
    3537
    3638#include "helenos.xbm"
     
    3941
    4042static __u8 *fbaddress = NULL;
     43
     44static __u8 *blankline = NULL;
    4145
    4246static unsigned int xres = 0;
     
    160164{
    161165        unsigned int i;
     166        __u8 *lastline = &fbaddress[(rows - 1) * ROW_BYTES];
    162167
    163168        memcpy((void *) fbaddress, (void *) &fbaddress[ROW_BYTES], scanline * yres - ROW_BYTES);
    164169
    165170        /* Clear last row */
    166         for (i = 0; i < FONT_SCANLINES; i++)
    167                 clear_line((rows - 1) * FONT_SCANLINES + i);
     171        if (blankline) {
     172                memcpy((void *) lastline, (void *) blankline, ROW_BYTES);
     173        } else {
     174                for (i = 0; i < FONT_SCANLINES; i++)
     175                        clear_line((rows - 1) * FONT_SCANLINES + i);
     176
     177                if (config.mm_initialized) {
     178                        /* Save a blank line aside. */
     179                        blankline = (__u8 *) malloc(ROW_BYTES, FRAME_ATOMIC);
     180                        if (blankline)
     181                                memcpy((void *) blankline, (void *) lastline, ROW_BYTES);
     182                }
     183        }
    168184}
    169185
Note: See TracChangeset for help on using the changeset viewer.