Partager via


GPESurf (Compact 2013)

3/26/2014

The GPESurf class represents a surface allocated, by the driver or by the Graphics Device Interface (GDI). The surface retains pixels in system memory or, if available on the Windows Embedded Compact-based platform, in video memory.

Generally, this class is created for all surfaces when the driver allocates memory; for example, in response to the DrvCreateDeviceBitmap function.

If the GDI allocates the surface, the driver creates a temporary surface of the TmpGPESurf class, which is derived from this class. This class is a wrapper around the SURFOBJ type created by the GPE.

TmpGPESurf objects persist only for the duration of the call to the display driver.

This class provides a number of methods for a driver to retrieve pointers to pixel data, pixel format, stride, height, and width.

In addition, GPESurf retains a flag to indicate whether the data is stored in video memory, which is verified by a call to the GPESurf::InVideoMemory method. The class also retains a flag that determines whether memory should be deallocated when the GPESurf object is deleted.

Typically, you derive a new surface class based on the GPESurf class for video memory allocations.

See Also

Reference

GPE Base Classes