Previously, a native compositor surface was considered to be
completely opaque, or completely translucent. This is due to
a limitation in how alpha is handled in the DirectComposition
API level.
With this patch, each picture cache slice maintains both an
opaque and translucent native surface handle. Tiles are assigned
to one of those surfaces based on their current opacity.
This is a performance optimization in some cases, since:
- Even if part of a cache is translucent, opaque tiles can still participate in occlusion at the compositor level.
- If a tile is changing from opaque to translucent, it now invalidates only that tile, rather than the entire surface.
The primary benefit of this patch is that it allows compositor
surfaces to be drawn sliced in between the opaque surface and
any overlay / alpha tiles.