Changes between Version 16 and Version 17 of CoordinatedGraphicsSystem


Ignore:
Timestamp:
Aug 4, 2012 11:24:09 AM (12 years ago)
Author:
noam.rosenthal@nokia.com
Comment:

Applies name changes in trunk.

Legend:

Unmodified
Added
Removed
Modified
  • CoordinatedGraphicsSystem

    v16 v17  
    7676
    7777'''[/browser/trunk/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp TextureMapperGL]''' is the GPU-accelerated implementation of the drawing primitives. It is currently used by Qt-WebKit2, GTK+ and EFL(?). TextureMapperGL uses shaders compatible with GL ES 2.0, though we’re in the process of converting it to use the WebGL infrastructure directly, which would help with shader compatibility.
    78 
    79 === Comments ===
    8078
    8179TextureMapperGL tries to use scissors for clipping whenever it can, though if the clipping is not rectangular stencil is used.
     
    10098
    10199'''[/browser/trunk/Source/WebCore/platform/graphics/texmap/TextureMapperBackingStore.cpp TextureMapperBackingStore]''' is what glues TextureMapperLayer with different backing stores.
    102 It allows the type of backing store to be abstracted away from TextureMapperLayer, allowing TextureMapperLayer to be used both with a standard tiled backing store for WebKit1 (TextureMapperTiledBackingStore), a GraphicsSurface-backed backing store for WebGL (TextureMapperSurfaceBackingStore) or a backing store for WebKit2 (WebKit::LayerBackingStore).
     100It allows the type of backing store to be abstracted away from TextureMapperLayer, allowing TextureMapperLayer to be used both with a standard tiled backing store for WebKit1 (TextureMapperTiledBackingStore), a GraphicsSurface-backed backing store for WebGL (TextureMapperSurfaceBackingStore) or a backing store for WebKit2 (WebKit::CoordinatedBackingStore).
    103101
    104102The implementation in TextureMapperTiledBackingStore is pretty simple, and is used only to work around the 2000x2000 texture size limitation in OpenGL. It is very different from the dynamic tiled backing store, discussed later.
     
    133131
    134132=== Classes ===
    135 '''[/browser/trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/WebGraphicsLayer.cpp WebGraphicsLayer]''' is what glues together the composited content which WebCore creates as GraphicsLayers, and the coordinated graphics system.
    136 WebGraphicsLayer 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.
    137 
    138 '''[/browser/trunk/Source/WebKit2/WebProcess/WebPage/LayerTreeCoordinator/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 WebGraphicsLayers, 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.
     133'''[/browser/trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp CoordinatedGraphicsLayer]''' is what glues together the composited content which WebCore creates as GraphicsLayers, and the coordinated graphics system.
     134CoordinatedGraphicsLayer 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.
     135
     136'''[/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.
    139137
    140138LayerTreeCoordinator 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.
     
    144142Another 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.
    145143
    146 '''[/browser/trunk/Source/WebKit2/UIProcess/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.
    147 
    148 '''[/browser/trunk/Source/WebKit2/UIProcess/WebLayerTreeRenderer.cpp WebLayerTreeRenderer]''' 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,
     144'''[/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.
     145
     146'''[/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,
    149147
    150148
     
    170168TiledBackingStore relies on an abstract WebCore::Tile implementation, allowing for different decisions around drawing the tiles synchronously or asynchronously.
    171169
    172 '''[/browser/trunk/Source/WebKit2/WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp TiledBackingStoreRemoteTile]''' is a web-process backend for WebCore::Tile, allowing software rendering of tiles into the coordinated graphics system. It's the tile-equivalent of WebGraphicsLayer, maintaining a tile-ID map. It uses a special client (a superclass of LayerTreeCoordinator) to allocate content surfaces and send the messages to the UI process.
     170'''[/browser/trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp CoordinatedTile]''' is a web-process backend for WebCore::Tile, allowing software rendering of tiles into the coordinated graphics system. It's the tile-equivalent of CoordinatedGraphicsLayer, maintaining a tile-ID map. It uses a special client (a superclass of LayerTreeCoordinator) to allocate content surfaces and send the messages to the UI process.
    173171
    174172'''[/browser/trunk/Source/WebKit2/Shared/ShareableBitmap.cpp ShareableBitmap]''' is used by Apple and other ports, but in this context it is used as a software backing-store for content updates. When there is no platform-specific GraphicsSurface implementation, ShareableBitmap acts as a fallback that uses standard shared memory as a backing store for the update, and then updates the TextureMapper GPU backing-stores (BitmapTextures) with the contents from that shared memory.
     
    184182'''[/browser/trunk/Source/WebKit2/Shared/ShareableSurface.cpp ShareableSurface]''' is a glue class that abstracts away the differences between GraphicsSurface and ShareableBitmap for the purposes of serialization. This is a convenience, to allow us to avoid adding #ifdefs or special code-paths for GraphicsSurface in too many places in WebKit2.
    185183
    186 '''[/browser/trunk/Source/WebKit2/UIProcess/LayerBackingStore.cpp LayerBackingStore]''' synchronizes remote tiles and ShareableSurfaces with TextureMapper in the UI process. It is responsible for copying or swapping the data in the BitmapTexture with new data or updates from ShareableSurface. It also knows how to paint the different tiles with relation to the parameters received from TextureMapperLayer.
     184'''[/browser/trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp CoordinatedBackingStore]''' synchronizes remote tiles and ShareableSurfaces with TextureMapper in the UI process. It is responsible for copying or swapping the data in the BitmapTexture with new data or updates from ShareableSurface. It also knows how to paint the different tiles with relation to the parameters received from TextureMapperLayer.
    187185
    188186'''[/browser/trunk/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp UpdateAtlas]''' is a graphics-memory optimization, designed to avoid fragmented allocations of small update buffers. Instead of allocating small buffers as it goes along, UpdateAtlas allocates large graphics buffers, and manages the update-patch allocations by itself, using square shapes inside the large buffers as sub-images to store temporary pixel data.
     
    197195== [#=QtScenegraph QtScenegraph integration] ==
    198196To integrate WebKit coordinated graphics with the QtScenegraph, the following main things were necessary:
    199 1. Making WebLayerTreeRenderer thread-safe, so it can run in QtScenegraph's rendering thread.
     1971. Making LayerTreeRenderer thread-safe, so it can run in QtScenegraph's rendering thread.
    2001981. Use a private API from QtScenegraph (QSGRenderNode) which allows us to render WebKit's layer tree without rendering into an intermediate FBO.
    2011991. Synchronize the remote content coming from the UI process at a time that is right for QtScenegraph.
    202 1. Propagate the clipping, transform and opacity attributes from QtScenegraph to WebLayerTreeRenderer.
     2001. Propagate the clipping, transform and opacity attributes from QtScenegraph to LayerTreeRenderer.
    2032011. Render the view's background.
    204202
    205 The class that handles most of this is [/browser/trunk/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp  QtWebPageSGNode]. Its main function, “render”, is used to translate QtScenegraph parameters to WebLayerTreeRenderer parameters. The SG node contains 3 nodes - a root node that controls the viewport transform, a background node, and a custom contents node which renders the actual web contents using WebLayerTreeRenderer.
     203The class that handles most of this is [/browser/trunk/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp  QtWebPageSGNode]. Its main function, “render”, is used to translate QtScenegraph parameters to LayerTreeRenderer parameters. The SG node contains 3 nodes - a root node that controls the viewport transform, a background node, and a custom contents node which renders the actual web contents using LayerTreeRenderer.
    206204Some other functionality is in QQuickWebPage::updatePaintNode.
    207205