Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2423 → Rev 2424

/branches/fs/uspace/fb/main.c
43,8 → 43,7
{
void *dest;
 
dest = as_get_mappable_page(IPC_GET_ARG2(*call),
PAGE_COLOR(IPC_GET_ARG1(*call)));
dest = as_get_mappable_page(IPC_GET_ARG2(*call));
if (ipc_answer_fast(callid, 0, (sysarg_t) dest, 0) == 0) {
if (*area)
as_area_destroy(*area);
/branches/fs/uspace/fb/fb.c
755,8 → 755,7
case IPC_M_AS_AREA_SEND:
/* We accept one area for data interchange */
if (IPC_GET_ARG1(*call) == shm_id) {
void *dest = as_get_mappable_page(IPC_GET_ARG2(*call),
PAGE_COLOR(IPC_GET_ARG1(*call)));
void *dest = as_get_mappable_page(IPC_GET_ARG2(*call));
shm_size = IPC_GET_ARG2(*call);
if (!ipc_answer_fast(callid, 0, (sysarg_t) dest, 0))
shm = dest;
834,23 → 833,27
copy_vp_to_pixmap(viewport_t *vport, pixmap_t *pmap)
{
int y;
int rowsize;
int tmp;
int tmp, srcrowsize;
int realwidth, realheight, realrowsize;
int width = vport->width;
int height = vport->height;
 
if (width + vport->x > screen.xres)
width = screen.xres - vport->x;
if (height + vport->y > screen.yres)
if (height + vport->y > screen.yres)
height = screen.yres - vport->y;
realwidth = pmap->width <= width ? pmap->width : width;
realheight = pmap->height <= height ? pmap->height : height;
 
rowsize = width * screen.pixelbytes;
 
for (y = 0; y < height; y++) {
srcrowsize = vport->width * screen.pixelbytes;
realrowsize = realwidth * screen.pixelbytes;
for (y = 0; y < realheight; y++) {
tmp = (vport->y + y) * screen.scanline +
vport->x * screen.pixelbytes;
memcpy(pmap->data + rowsize * y, screen.fbaddress + tmp,
rowsize);
memcpy(pmap->data + srcrowsize * y, screen.fbaddress + tmp,
realrowsize);
}
}
 
1369,8 → 1372,7
fb_invert_colors = sysinfo_value("fb.invert-colors");
 
asz = fb_scanline * fb_height;
fb_addr = as_get_mappable_page(asz, (int)
sysinfo_value("fb.address.color"));
fb_addr = as_get_mappable_page(asz);
physmem_map(fb_ph_addr, fb_addr, ALIGN_UP(asz, PAGE_SIZE) >>
PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE);
/branches/fs/uspace/fb/ega.c
315,8 → 315,7
iospace_enable(task_get_id(), (void *) EGA_IO_ADDRESS, 2);
 
sz = scr_width * scr_height * 2;
scr_addr = as_get_mappable_page(sz, (int)
sysinfo_value("fb.address.color"));
scr_addr = as_get_mappable_page(sz);
 
physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >>
PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE);