A method for preparing display data to be transmitted to a remote client terminal, wherein the method is for use in a server having a primary framebuffer for storing the display data and a display encoder that uses a secondary framebuffer for transmitting the display data to the remote client terminal, the method comprising: identifying a bounding box (200, 300) relating to drawing commands that cause updates to display data in the primary framebuffer, wherein the bounding box is a rectangle of minimum size that bounds all display data in the primary framebuffer to be updated as a result of executing the drawing commands; marking entries in a data structure, the data structure being a quadtree in the bounding box where the regions of the quadtree are iteratively divided into sub-quadrant regions until each changed pixel is contained within a smallest sub-quadrant region, wherein each entry of the data structure corresponds to a different region (215, 305-330) in the primary framebuffer and marking comprises marking the entries in the data structure corresponding to all the smallest sub-quadrant regions (215, 305-330) of the primary framebuffer that include display data in the bounding box to be updated; comparing pixel values in the sub-quadrant regions (215, 305-330) of the primary framebuffer corresponding to the marked entries with pixel values in corresponding sub-quadrant regions (215, 305-330) of the secondary framebuffer; if the comparing step indicates that the compared sub-quadrant regions of the primary framebuffer and the secondary framebuffer contain the same pixel values, trimming the data structure by clearing the marked entries to indicate that no actual pixel values were changed in the corresponding sub-quadrant regions so that the trimmed data structure contains only marked entries for compared sub-quadrant regions (215, 305-330) having differences; copying sub-quadrant regions for which the comparing step indicates differences from the primary frame buffer into corresponding sub-quadrant regions of the secondary buffer; and publishing to the display encoder the trimmed data structure, so that the display encoder is able to transmit updated display data of regions (215, 305-330) of the secondary framebuffer that correspond to marked entries in the trimmed data structure. identifying a bounding box (200, 300) relating to drawing commands that cause updates to display data in the primary framebuffer, wherein the bounding box is a rectangle of minimum size that bounds all display data in the primary framebuffer to be updated as a result of executing the drawing commands; marking entries in a data structure, the data structure being a quadtree in the bounding box where the regions of the quadtree are iteratively divided into sub-quadrant regions until each changed pixel is contained within a smallest sub-quadrant region, wherein each entry of the data structure corresponds to a different region (215, 305-330) in the primary framebuffer and marking comprises marking the entries in the data structure corresponding to all the smallest sub-quadrant regions (215, 305-330) of the primary framebuffer that include display data in the bounding box to be updated; comparing pixel values in the sub-quadrant regions (215, 305-330) of the primary framebuffer corresponding to the marked entries with pixel values in corresponding sub-quadrant regions (215, 305-330) of the secondary framebuffer; if the comparing step indicates that the compared sub-quadrant regions of the primary framebuffer and the secondary framebuffer contain the same pixel values, trimming the data structure by clearing the marked entries to indicate that no actual pixel values were changed in the corresponding sub-quadrant regions so that the trimmed data structure contains only marked entries for compared sub-quadrant regions (215, 305-330) having differences; copying sub-quadrant regions for which the comparing step indicates differences from the primary frame buffer into corresponding sub-quadrant regions of the secondary buffer; and publishing to the display encoder the trimmed data structure, so that the display encoder is able to transmit updated display data of regions (215, 305-330) of the secondary framebuffer that correspond to marked entries in the trimmed data structure.