Changes between Version 22 and Version 23 of CoordinatedGraphicsSystem


Ignore:
Timestamp:
Jan 25, 2013 12:07:19 PM (8 years ago)
Author:
Helder Correia
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CoordinatedGraphicsSystem

    v22 v23  
    133133CoordinatedGraphicsLayer does not deal with IPC directly. Instead, it saves the information gathered from the compositor, and prepares it for serialization. It maintains an ID for each layer, which allows naming each layer, links a layer ID with its backing store, and deals with directly composited images and how they are serialized.
    134134
    135 '''[/browser/trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp LayerTreeCoordinator]''' is the “boss” for synchronizing the content changes and the viewport changes.  It acts on a frame-by-frame basis. For each frame it retrieves the up-to-date layer information from the different CoordinatedGraphicsLayers, makes sure the backing-store content is ready to be serialized, prepares the information needed for scroll adjustment, and passes all that info to the UI process in a series of messages for each frame.
    136 
    137 LayerTreeCoordinator maintains a map of “directly composited images” - images that are rendered once and used multiple times in the same texture. LayerTreeCoordinator maintains the ref-counted lifecycle of such an image, signaling to the UI process when an image is no longer in use and its backing texture can be destroyed.
    138 
    139 LayerTreeCoordinator is also responsible for two ''special layers'' that are not recognized as “composited” by WebCore – a layer for the '''main web-content''', known as non-composited content, is treated as a layer. That is also true for the '''overlay layer''', which paints things such as the scrollbar and the tap indicators.
    140 
    141 Another important role of LayerTreeCoordinator is to receive the viewport information from the UI process, and to propagate that information to the different tiled backing-stores so that they can prepare to create/destroy tiles.
    142 
    143 '''[/browser/trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp LayerTreeCoordinatorProxy]''' is what binds together the viewport, the GPU renderer and the contents. It doesn't have functionality of its own, instead it acts as a message hub between those components.
     135'''[/browser/trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp CoordinatedLayerTreeHost]''' is the “boss” for synchronizing the content changes and the viewport changes.  It acts on a frame-by-frame basis. For each frame it retrieves the up-to-date layer information from the different CoordinatedGraphicsLayers, makes sure the backing-store content is ready to be serialized, prepares the information needed for scroll adjustment, and passes all that info to the UI process in a series of messages for each frame.
     136
     137CoordinatedLayerTreeHost maintains a map of “directly composited images” - images that are rendered once and used multiple times in the same texture. CoordinatedLayerTreeHost maintains the ref-counted lifecycle of such an image, signaling to the UI process when an image is no longer in use and its backing texture can be destroyed.
     138
     139CoordinatedLayerTreeHost is also responsible for two ''special layers'' that are not recognized as “composited” by WebCore – a layer for the '''main web-content''', known as non-composited content, is treated as a layer. That is also true for the '''overlay layer''', which paints things such as the scrollbar and the tap indicators.
     140
     141Another important role of CoordinatedLayerTreeHost is to receive the viewport information from the UI process, and to propagate that information to the different tiled backing-stores so that they can prepare to create/destroy tiles.
     142
     143'''[/browser/trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp CoordinatedLayerTreeHostProxy]''' is what binds together the viewport, the GPU renderer and the contents. It doesn't have functionality of its own, instead it acts as a message hub between those components.
    144144
    145145'''[/browser/trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp LayerTreeRenderer]''' is the class that knows how to turn serialized information from the web process and viewport information from the view classes into a GPU-renderable tree of TextureMapperLayers. It maintains a map of layer IDs to layers,
     
    207207[[BR]]
    208208== [#=CSSAnimations CSS Animation Support] ==
    209 Currently, in WebKit2, CSS animation frames are handled together with all other frames – the web process re-layouts for each frame, and sends the new transform/opacity/filter information together with the rest of the frame. The requestAnimationFrame feature, which allows synchronizing animations with the display refresh, is synchronized with LayerTreeCoordinator to make sure those animation frames are interpolated as accurately and smoothly as possible, avoiding choppiness and throttling.
     209Currently, in WebKit2, CSS animation frames are handled together with all other frames – the web process re-layouts for each frame, and sends the new transform/opacity/filter information together with the rest of the frame. The requestAnimationFrame feature, which allows synchronizing animations with the display refresh, is synchronized with CoordinatedLayerTreeHost to make sure those animation frames are interpolated as accurately and smoothly as possible, avoiding choppiness and throttling.
    210210
    211211One thing that is missing is threaded animations: allowing animations to continue to produce frames while lengthy operations in the web process are taking place. This will allow animations to appear smooth while elements that are not related to that animation are being rendered into the backing store.