Composition engine

In order to drive visual updates, the application should use IDirectManipulationCompositor. This object is responsible for updating visuals based on Direct Manipulation updates, driving inertia updates forward, and providing composition timing information to Direct Manipulation Furthermore, an application should use the DCompManipulationCompositor provided by Direct Manipulation, which will handle all visual updates on behalf of the application and drive inertia updates.

The DCompManipulationCompositor is an implementation of the IDirectManipulationCompositor interface that wraps DirectComposition. Rather than having the application apply the output, through this compositor object Direct Manipulation can apply the output by setting the transforms directly on the DirectComposition tree. By using this configuration, input can be processed and output transforms can be applied, regardless of activity on the UI thread.

To give Direct Manipulation information on the timing of the composition engine, the DCompManipulationCompositor class implements the IDirectManipulationFrameInfoProvider interface. When creating a viewport, QueryInterface the IDirectManipulationCompositor pointer obtained from CoCreateInstance for an instance of IDirectManipulationFrameInfoProvider. The IDirectManipulationFrameInfoProvider pointer is passed to the IDirectManipulationManager::CreateViewport() function.