ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/video_vosf.h
(Generate patch)

Comparing BasiliskII/src/Unix/video_vosf.h (file contents):
Revision 1.11 by gbeauche, 2001-01-11T16:39:08Z vs.
Revision 1.12 by gbeauche, 2001-01-11T18:00:40Z

# Line 350 | Line 350 | static bool Screen_fault_handler_init()
350   *      Update display for Windowed mode and VOSF
351   */
352  
353 + /*      How can we deal with array overrun conditions ?
354 +        
355 +        The state of the framebuffer pages that have been touched are maintained
356 +        in the dirtyPages[] table. That table is (pageCount + 2) bytes long.
357 +
358 + Terminology
359 +        
360 +        "Last Page" denotes the pageCount-nth page, i.e. dirtyPages[pageCount - 1].
361 +        "CLEAR Page Guard" refers to the page following the Last Page but is always
362 +        in the CLEAR state. "SET Page Guard" refers to the page following the CLEAR
363 +        Page Guard but is always in the SET state.
364 +
365 + Rough process
366 +        
367 +        The update routines must determine which pages have to blitted to the
368 +        screen. This job consists in finding the first_page that was touched.
369 +        i.e. find the next page that is SET. Then, finding how many pages were
370 +        touched starting from first_page. i.e. find the next page that is CLEAR.
371 +
372 + Two cases
373 +
374 +        - Last Page is CLEAR: find_next_page_set() will reach the SET Page Guard
375 +        but it is beyond the valid pageCount value. Therefore, we exit from the
376 +        update routine.
377 +        
378 +        - Last Page is SET: first_page equals (pageCount - 1) and
379 +        find_next_page_clear() will reach the CLEAR Page Guard. We blit the last
380 +        page to the screen. On the next iteration, page equals pageCount and
381 +        find_next_page_set() will reach the SET Page Guard. We still safely exit
382 +        from the update routine because the SET Page Guard position is greater
383 +        than pageCount.
384 + */
385 +
386   static inline void update_display_window_vosf(void)
387   {
388          int page = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines