Bug 82655 - [CSS Shaders] Make CSS Shaders run accelerated on Chromium
Summary: [CSS Shaders] Make CSS Shaders run accelerated on Chromium
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 85086
  Show dependency treegraph
 
Reported: 2012-03-29 14:16 PDT by Alexandru Chiculita
Modified: 2013-04-08 14:49 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Chiculita 2012-03-29 14:16:16 PDT
Make the CSS Shaders integrate with the accelerated layers pipeline.
Comment 1 Qiankun Miao 2013-03-31 23:37:20 PDT
(In reply to comment #0)
> Make the CSS Shaders integrate with the accelerated layers pipeline.

 I am trying to hardware accelerate CSS Shaders in chromium. As we known, CSS Shaders  are only software rendered in WebKit currently. So, its performance is not very good. The bottleneck is that, the result texture of CSS Shaders is in GPU after the shaders were applied. Webkit will read back the texture as a bitmap from GPU to CPU for further rendering. If we active the hardware accelerated path, the result texture read back can be eliminated. The result texture can be directly used for compositing other than being read back and uploaded to GPU again. 
    I have three ideas in my mind how to do the hardware acceleration in chromium:
Firstly, when there is an element with CSS Shaders style,  active the hardware path by creating GraphicsLayer for the RenderLayer containing the element, enabling compositing mode.  A tiled_layer is created in chromium compositor for the RenderLayer painting. WebKit applies shaders on the painting result and gets a result texture in GPU. Then the texture is directly used for compositing with some logical modification in chromium compositor for the tiled_layer.
Secondly, a texture_layer is created for the RenderLayer containing an element with CSS Shaders. No much modifications in chromium compositor’s logic. By creating a CSSShadersBridge which is similar to Canvas2DLayerBridge, the applied result texture of CSS Shader can directly used for compositing.  CSSShadersBridge is responsible for preparing the result texture.
Thirdly, the RenderLayer is still rendered in the tiled_layer as normal tiled_layers. Then, apply CSS shaders on the result in a seperate render surface which is similar to CSS Filters. Chromium compositor gets shaders from WebKit and create a ShadersRenderer to apply the shaders. ShadersRenderer handles mesh data, programs, and parameters. ShadersRenderer is similar to CustomFilterRenderer in WebKit.
    The above ideas are immature. Could anyone give some comments? I am very appreciated for that. Do any guys working on Shaders hardware acceleration in chromium now?  I noticed this bug was created long time ago.