Changes between Version 14 and Version 15 of CoordinatedGraphicsSystem

Aug 4, 2012 5:31:44 AM (11 years ago)



  • CoordinatedGraphicsSystem

    v14 v15  
    158158Unlike coordinated compositing, which includes mainly light-weight rendering information about each layer, backing-stores contain pixel data, and thus are both memory-hungry and are expensive to copy and serialize. Backing-stores are drawing into by software or by hardware, depending on the scenario, and thus require binding to platform/OS/GPU-specific code.
    160 The current Qt architecture is based on a dynamic tiled backing-store. This means that for each layer in the layer tree, not all the content is saved in GPU memory the whole time, but rather only the visible contents plus some cover area around it, depending on heuristics. The TiledBackingStore system is responsible for maintaining these heuristics, based on variables such as the scroll position, contents scale and panning trajectory.
     160As OpenGL has texture size limitations we need to restrict what we are saving in GPU memory (ie. not paint and store all the contents in the back-buffer) and we also want to avoid repainting what didn't change, we cannot use the viewport rect as the texture either, as that would invalidate the back-buffer at every scroll.
     162The solution is to use a tiled backing-store where each layer is split up into tiles. The backing store is dynamic in the sense that it doesn't paint all tiles, but only the tiles visible (tiles intersecting the ''visible rect'') plus some area outside (pre-painted tiles; ''cover rect''). In order to save memory it also keeps a rect of tiles to keep in memory (''keep rect'') and removes those outside.
     164The idea about tile pre-painting, is having tiles ready when the user is going to scroll the page. There are some heuristics to calculate where to pre-paint, depending about the panning trajectory, scroll position and contents scale.
     166Tiling texture gives the benefit of texture streaming. When a large layer has to be uploaded to the GPU it can be done several tiles at the time and thus conserving memory bandwidth and preventing the GPU from stalling during long texture uploads.
    162168=== Classes ===
    186192* Graceful handling of low memory situations, e.g. by visible incremental updates to tiles using a smaller UpdateAtlas, and adjustment to how the the TiledBackingStore computes the keep and cover rects.
    187193* Allow different pixel formats for tiles, e.g. 16-bit for opaque tiles and 8-bit for masks.
     194* Use GraphicsSurfaces for fast texture uploads.