NQD dirty boxes, SDL backend.

This reduces the number of Screen_fault_handler() calls by 80%. i.e. VOSF
is now viable on this turtle MacOS X. Besides, since there is no buffer
comparison, idle sleep can really be effective. SheepShaver in idle mode
on my PBG4 now goes below 8% of CPU resources instead of 70-80% with
bounding boxes based video refreshes.

Caveat: if your program doesn't use standard MacOS routines that call NQD,
then you can expect slower (visual) performance. However, I do think the
new default behavior (VOSF+NQD) is the most common.
This commit is contained in:
gbeauche 2006-05-13 16:58:44 +00:00
parent e4015e069f
commit 1470a8af13

View File

@ -2246,3 +2246,27 @@ static int redraw_func(void *arg)
return 0;
}
#endif
/*
* Record dirty area from NQD
*/
#ifdef SHEEPSHAVER
void video_set_dirty_area(int x, int y, int w, int h)
{
const VIDEO_MODE &mode = drv->mode;
const int screen_width = VIDEO_MODE_X;
const int screen_height = VIDEO_MODE_Y;
const int bytes_per_row = VIDEO_MODE_ROW_BYTES;
#ifdef ENABLE_VOSF
if (use_vosf) {
vosf_set_dirty_area(x, y, w, h, screen_width, bytes_per_row);
return;
}
#endif
// XXX handle dirty bounding boxes for non-VOSF modes
}
#endif