1.3.1.1 Caches

The Remote Desktop Protocol: GDI Acceleration Extension defines a number of caches that can be leveraged by clients and servers:

  • Bitmap Cache: Stores bitmap images.

  • Color Table Cache: Stores color palettes.

  • Glyph Cache: Stores character images.

  • Fragment Cache: Stores collections of glyphs.

  •  Brush Cache: Stores 8-by-8-pixel bitmaps used to fill regions.

  • Offscreen Bitmap Cache: Stores writable bitmaps.

  • GDI+ Caches: Used to cache GDI+ 1.1 primitives:

    • Graphics Cache

    • Brush Cache

    • Pen Cache

    • Image Attributes Cache

    • Image Cache

  • NineGrid Bitmap Cache: Stores NineGrid-compliant bitmaps. For more information about nine-grid bitmaps, see [NINEGRID].

All of the caches (except the bitmap cache) are memory-based and are not persisted across connections. The use of caches is optional and is specified through the use of capability sets.

Encoded drawing operations that use cached items refer to these items by specifying the cache entry in which the item is stored (if there are multiple caches, the cache ID also needs to be specified). This implies that an item has to first be cached (by the server and client) before any drawing operations that reference it can be sent.

For example, a server can instruct a client to cache a particular brush pattern in the Brush Cache, for example, at index location 23. Then, in a subsequent drawing operation that involves a brush pattern, the server can instruct the client to use the brush pattern stored in the Brush Cache at index location 23.

Entries can be evicted from a cache if room needs to be made for new items. The server determines what entries will be evicted and then instructs the client to perform the eviction. In this way, the client and server caches remain in sync.