A system that provides graphics commands that represent graphics or an image, to a consuming process. The graphics commands are represented by a visual tree which includes objects and resources describing the objects. The objects and resources are communicated to a composition engine that creates an analogous composition tree that is analogous to the visual tree. The composition tree is used to render the graphics or image.