
Another two optional registry entries determine a minimum width and height that allow video surface allocations to succeed.
In Windows Embedded Compact 7 GDI, video surface allocations can happen with a REQUIRE_VIDEO _MEMORY or a PREFER_VIDEO_MEMORY flag. The following options will force surface allocations with the PREFER_VIDEO_MEMORY flag to be allocated in system memory if the width and height are lower than stated.
The “MinVidSurfX” registry entry defines the minimum width of a surface allocation for it to succeed with video memory. “MinVidSurfY” defines the minimum height. The surface allocation will succeed if either the width or the height is at the required minimum.
In this example, surfaces allocated with the PREFER_VIDEO_MEMORY where the width and height are both less than 16 pixels are forced to be in system memory.
This option increases performance of the display device as smaller video images, such as icons, would be kept in system memory and only blitted onto the visible frame buffer when they are needed. This ensures optimal use of the display device for larger video surfaces where acceleration makes sense.