Bug 88427 - [CSS Shaders] Reuse precompiled shaders across elements
Summary: [CSS Shaders] Reuse precompiled shaders across elements
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexandru Chiculita
Depends on: 85013
Blocks: 85086
  Show dependency treegraph
Reported: 2012-06-06 09:59 PDT by Alexandru Chiculita
Modified: 2012-08-07 11:18 PDT (History)
4 users (show)

See Also:

Patch V1 (38.24 KB, patch)
2012-07-23 17:21 PDT, Alexandru Chiculita
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Chiculita 2012-06-06 09:59:08 PDT
When the style of an element changes the shader is recompiled and uploaded to the GPU. Reuse the shaders as much as possible.
Comment 1 Alexandru Chiculita 2012-07-23 17:21:24 PDT
Created attachment 153910 [details]
Patch V1
Comment 2 Dean Jackson 2012-08-03 14:23:46 PDT
Comment on attachment 153910 [details]
Patch V1

View in context: https://bugs.webkit.org/attachment.cgi?id=153910&action=review


> LayoutTests/css3/filters/custom/custom-filter-shader-reuse.html:26
> +            function runTest()
> +            {

{ on line above

> Source/WebCore/ChangeLog:10
> +        CustomFilterGlobalContext now acts as a cache for the compiled shaders. Note that only the shaders displayed on screen
> +        are cached, making it useful in animations or when more elements share the same shader filter.

maybe "only the shaders displayed on the page" because I guess a filtered element might be scrolled off screen?

> Source/WebCore/ChangeLog:20
> +        is allowed to be null. A null strings is the placeholder for the default shader.

typo: strings -> string.

> Source/WebCore/platform/graphics/filters/CustomFilterCompiledProgram.h:82
> +    // Note that, CustomFilterGlobalContext doesn't not keep a strong reference to 
> +    // the CustomFilterCompiledProgram.

typo: no comma necessary
Comment 3 Alexandru Chiculita 2012-08-06 16:08:21 PDT
(In reply to comment #2)

Thanks! I will submit an updated patch soon.
Comment 4 Alexandru Chiculita 2012-08-07 11:18:17 PDT
Landed in http://trac.webkit.org/changeset/124897 .