Changeset 0a9a324 in mainline


Ignore:
Timestamp:
2006-06-08T16:42:20Z (18 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8bd0316
Parents:
7674793
Message:

Speed update for frame buffer.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • console/gcons.c

    r7674793 r0a9a324  
    4444#include "gcons.h"
    4545
    46 #define CONSOLE_TOP      65
     46#define CONSOLE_TOP      66
    4747#define CONSOLE_MARGIN   6
    4848
    4949#define STATUS_START    110
    5050#define STATUS_TOP      8
    51 #define STATUS_SPACE    3
     51#define STATUS_SPACE    4
    5252#define STATUS_WIDTH    48
    5353#define STATUS_HEIGHT   48
  • fb/fb.c

    r7674793 r0a9a324  
    224224}
    225225
    226 /** Fill line with color BGCOLOR */
    227 static void clear_line(int vp, unsigned int y)
    228 {
    229         unsigned int x;
    230         for (x = 0; x < viewports[vp].width; x++)
    231                 putpixel(vp, x, y, viewports[vp].style.bg_color);
     226static inline void putpixel_mem(char *mem, unsigned int x, unsigned int y,
     227                                int color)
     228{
     229        (*screen.rgb2scr)(&mem[POINTPOS(x,y)],color);
    232230}
    233231
     
    237235{
    238236        unsigned int x, y;
     237        static void *tmpline;
     238
     239        if (!tmpline)
     240                tmpline = malloc(screen.scanline*screen.pixelbytes);
    239241
    240242        /* Clear first line */
    241243        for (x = 0; x < width; x++)
    242                 putpixel(vp, sx + x, sy, color);
     244                putpixel_mem(tmpline, x, 0, color);
    243245
    244246        /* Recompute to screen coords */
     
    246248        sy += viewports[vp].y;
    247249        /* Copy the rest */
    248         for (y = sy+1;y < sy+height; y++)
    249                 memcpy(&screen.fbaddress[POINTPOS(sx,y)],
    250                        &screen.fbaddress[POINTPOS(sx,sy)],
     250        for (y = sy;y < sy+height; y++)
     251                memcpy(&screen.fbaddress[POINTPOS(sx,y)], tmpline,
    251252                       screen.pixelbytes * width);
    252253
Note: See TracChangeset for help on using the changeset viewer.