1. A method comprising: by a computing device, rendering, as a first frame of a video in a video compression format, a graphical user interface (GUI) of a software application on the computing device based on a multi-layered-tree representation of the GUI; by the computing device, modifying the multi-layered-tree representation of the GUI in response to an input or output event associated with one or more content items of the GUI, wherein the modifying comprises modifying a transformation of a structural layer of the multi-layered-tree representation, wherein the structural layer contains a content layer that represents the content items; calculating a placement of each of the content items in the content layer by traversing a multi-layer tree from the root layer to the content layer and by multiplying a transformation of the content layer by the modified transformation of the structural layer; and by the computing device, rendering, as a second frame of the video in the video compression format, the GUI based on the multi-layered-tree representation of the GUI as modified.