Changes between Initial Version and Version 1 of AGC


Ignore:
Timestamp:
Aug 3, 2010 9:01:41 AM (14 years ago)
Author:
noam.rosenthal@nokia.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AGC

    v1 v1  
     1= AGC - or Accelerated Graphics Context =
     2AGC is an initiative to support hardware acceleration in WebKit, at a lower level than today's accelerated compositing.
     3
     4Right now the architecture looks something like the following:
     5Document -> Renderer -> Compositor -> Platform-specific layer system (QGraphicsView, CoreAnimations, Chromium layers...)
     6
     7... where the compositor is invoked for CSS opacity/transform animations and 3D transforms.
     8
     9The idea is to share the layer system across platforms, with a common GLES2 implementation, and to have the following as platform specific parts:
     10
     11 1. '''Content rasterizer''': each layer's content is still handled in software by the platform.
     12 2. '''Setting up the GL context''':  The web-view has to initiate a GL context and make it current before letting WebCore render into it
     13 3. Optionally, a platform-specific implementation of AGC.
     14
     15== The purpose ==
     16The purpose for this is to make it easy for ports to use the accelerated-compositing feature of webkit, without having to write a whole scene-graph library. The theory is that WebCore already retains the scene-graph, so there's no need for an additional scene-graph library underneath it, and what's needed is simple translation from the model to a paint sequence.
     17
     18== The API ==
     19AGC is a low level API tuned to what GPU and blitter hardware can actually accelerate, unlike the GraphicsContext API which is more of a classic 2D software API. The only primitives available to AGC are '''Texture''', '''Surface''' and '''Quad'''. The idea is that the backend for AGC would know how to draw a texture on a surface in a given quad (which is usually represented as a rectangle + matrix), and the frontend, which is GraphicsLayerAGC, would translate the retainable-scenegraph model it gets from WebCore into a paint sequence that includes almost exclusively mapping textures between surfaces (other functions may include rudimentary clipping).
     20This allows, for example, accelerated reflections and accelerated masks with multi-texturing.
     21
     22
     23== Files ==
     24Currently in [http://gitorious.org/~noamr/webkit/noamrs-webkit/commits/AGC]
     25See:
     26
     27{{{
     28platform/graphics/AcceleratedGraphicsContext.h
     29platform/graphics/GraphicsLayerAGC.h
     30platform/graphics/GraphicsLayerAGC.cpp
     31platform/graphics/AGCOpenGL.h
     32platform/graphics/AGCOpenGL.cpp
     33platform/graphics/qt/AGCQt.h
     34platform/graphics/qt/AGCQt.cpp
     35}}}
     36
     37