[][src]Function ul_sys::ulSurfaceGetDirtyBounds

pub unsafe extern "C" fn ulSurfaceGetDirtyBounds(
    surface: ULSurface
) -> ULIntRect

Get the dirty bounds.

This value can be used to determine which portion of the pixel buffer has been updated since the last call to ulSurfaceClearDirtyBounds().

The general algorithm to determine if a Surface needs display is:

  if (!ulIntRectIsEmpty(ulSurfaceGetDirtyBounds(surface))) {
      // Surface pixels are dirty and needs display.
      // Cast Surface to native Surface and use it here (pseudo code)
      DisplaySurface(surface);

      // Once you're done, clear the dirty bounds:
      ulSurfaceClearDirtyBounds(surface);
 }