All display driver functions that draw to the screen are modified to accumulate clipped bounding rectangles into all active SCAs when necessary. The drawing functions determine whether they should do this by examining the FunN (Function Number/COM_ flags) parameter. If the COM_SCR_BOUND flag is set, and the function is drawing to the screen, then bounding rectangles are accumulated into the active SCAs; otherwise, no accumulation takes place. The setting of COM_SCR_BOUND is controlled by the GreOpenScreenChangeArea and GreCloseScreenChangeArea functions. For details, refer to these functions in the chapter of the OS/2 Presentation Device Driver Reference that discusses mandatory and simulated graphics engine functions.

In every drawing call, the following test is performed:

    if (DCAFBoundsRequired(FunN))
    {
      accumulate the bound

    }

where the DCAFBoundsRequired macro is defined in DCAFEXTF.H as follows:

#define DCAFBoundsRequired(FunN)      \
    ( (FunN & COM_SCR_BOUND) &&       \    /* COM_SCR_BOUND is set   */
      (FunN & COM_DRAW) &&            \    /*  COM_DRAW is set    */
      (pdc->DCIDCType == OD_DIRECT) )      /*  the destination is the screen */

When change-area tracking is not needed, COM_SCR_BOUND will never be set. The difference in operation and performance of the DCAF-enabled base driver will be negligible-one additional check of the COM_SCR_BOUND flag per drawing function.


[Back: Creating a new SCA]
[Next: Performing the Bounding Accumulation]