A visual tree structure as specified by a program is constructed and
maintained by a visual system's user interface thread. As needed, the
tree structure is traversed on the UI thread, with changes compiled into
change queues. A secondary rendering thread that handles animation and
graphical composition takes the content from the change queues, to
construct and maintain a condensed visual tree. Static visual subtrees
are collapsed, leaving a condensed tree with only animated attributes
such as transforms as parent nodes, such that animation data is managed
on the secondary thread, with references into the visual tree. When run,
the rendering thread processes the change queues, applies changes to the
condensed trees, and updates the structure of the animation list as
necessary by resampling animated values at their new times. Content in
the condensed visual tree is then rendered and composed. Animation and a
composition communication protocol are also provided.