- Timestamp:
- 2006-06-08T16:42:20Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8bd0316
- Parents:
- 7674793
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fb/fb.c
r7674793 r0a9a324 224 224 } 225 225 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); 226 static inline void putpixel_mem(char *mem, unsigned int x, unsigned int y, 227 int color) 228 { 229 (*screen.rgb2scr)(&mem[POINTPOS(x,y)],color); 232 230 } 233 231 … … 237 235 { 238 236 unsigned int x, y; 237 static void *tmpline; 238 239 if (!tmpline) 240 tmpline = malloc(screen.scanline*screen.pixelbytes); 239 241 240 242 /* Clear first line */ 241 243 for (x = 0; x < width; x++) 242 putpixel (vp, sx + x, sy, color);244 putpixel_mem(tmpline, x, 0, color); 243 245 244 246 /* Recompute to screen coords */ … … 246 248 sy += viewports[vp].y; 247 249 /* 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, 251 252 screen.pixelbytes * width); 252 253
Note:
See TracChangeset
for help on using the changeset viewer.