## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Drawing to Display Devices

Because changes on the screen can affect more than one device context, the graphics engine notifies the display driver when a change occurs. Notification is performed through a call to the function (see GreDeviceInvalidateVisRegion) in the display driver. This routine identifies the affected device contexts and supplies a pointer (pInstance) to the instance data of each device context. The handling routine for GreInvalidateVisRegion sets a flag, such as HDC_IS_DIRTY, in the instance data for all identified device contexts.

All routines that draw to the screen test the HDC_IS_DIRTY flag. If this flag is set, the routines call VisRegionNotify before drawing the visible region.