Subversion Repositories HelenOS-historic

Rev

Rev 1760 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1760 Rev 1766
Line 386... Line 386...
386
 
386
 
387
    /* Allocate double buffer */
387
    /* Allocate double buffer */
388
    int totsize = scanline * yres;
388
    int totsize = scanline * yres;
389
    int pages = SIZE2FRAMES(totsize);
389
    int pages = SIZE2FRAMES(totsize);
390
    int order;
390
    int order;
391
    int rc;
-
 
392
    if (pages == 1)
391
    if (pages == 1)
393
        order = 0;
392
        order = 0;
394
    else
393
    else
395
        order = fnzb(pages-1)+1;
394
        order = fnzb(pages-1)+1;
396
 
395
 
397
    dbbuffer = frame_alloc_rc(order,FRAME_ATOMIC | FRAME_KA, &rc);
396
    dbbuffer = frame_alloc(order,FRAME_ATOMIC | FRAME_KA);
398
    if (!dbbuffer)
397
    if (!dbbuffer)
399
        printf("Failed to allocate scroll buffer.\n");
398
        printf("Failed to allocate scroll buffer.\n");
400
    dboffset = 0;
399
    dboffset = 0;
401
 
400
 
402
    /* Initialized blank line */
401
    /* Initialized blank line */
403
    blankline = (__u8 *) malloc(ROW_BYTES, FRAME_ATOMIC);
402
    blankline = (__u8 *) malloc(ROW_BYTES, FRAME_ATOMIC);
404
    ASSERT(blankline);
403
    if (!blankline)
-
 
404
        panic("Failed to allocate blank line for framebuffer.");
405
    for (y=0; y < FONT_SCANLINES; y++)
405
    for (y=0; y < FONT_SCANLINES; y++)
406
        for (x=0; x < xres; x++)
406
        for (x=0; x < xres; x++)
407
            (*rgb2scr)(&blankline[POINTPOS(x,y)],BGCOLOR);
407
            (*rgb2scr)(&blankline[POINTPOS(x,y)],BGCOLOR);
408
 
408
 
409
    clear_screen();
409
    clear_screen();