Bug 99908 - [CSS Shaders] Set FilterOperations on GraphicsLayer after the program of CSS Shaders is loaded.
Summary: [CSS Shaders] Set FilterOperations on GraphicsLayer after the program of CSS ...
Status: RESOLVED FIXED
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: 74651 98990
  Show dependency treegraph
 
Reported: 2012-10-19 23:58 PDT by Dongseong Hwang
Modified: 2012-10-23 14:48 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.58 KB, patch)
2012-10-20 00:11 PDT, Dongseong Hwang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dongseong Hwang 2012-10-19 23:58:28 PDT
CSS Shaders can not render anything until the program is loaded.
If there is partial loaded shaders program, whole FilterOperations chain can not render anything. It occurs a flash.
So We have to wait until the program is loaded, to prevent a flash as RenderLayerBacking::updateImageContents() waits until an image is fully loaded.
Comment 1 Dongseong Hwang 2012-10-20 00:11:27 PDT
Created attachment 169759 [details]
Patch
Comment 2 Noam Rosenthal 2012-10-20 09:12:38 PDT
Comment on attachment 169759 [details]
Patch

This seems like a platform specific behavior - when we set the filters on a particular GraphicsLayer (e.g. CoordinatedGraphicsLayer) we can subscribe to the program as a client and reset the filters when the program is loaded.
Comment 3 Dongseong Hwang 2012-10-20 20:05:22 PDT
(In reply to comment #2)
> (From update of attachment 169759 [details])
> This seems like a platform specific behavior - when we set the filters on a particular GraphicsLayer (e.g. CoordinatedGraphicsLayer) we can subscribe to the program as a client and reset the filters when the program is loaded.

Thanks for good opinion.

We already subscribe to the program when the program is loaded, because WebCore recalculates the style when the program is loaded.

I think both approaches can be right. Each GraphicsLayer easily resets the filters, but I prefer this patch because of two reasons.
1. Each platform needs to have similar code to handle unloaded programs.
2. As I mentioned in Changelog, RenderLayerBacking::updateImageContents() already waits calling GraphicsLayer::setContentsToImage() until an image is fully loaded. I want RenderLayerBacking to handle CachedProgram similar to CachedImage. I think same policy increases code readability.

I'm looking forward your feedback :)
Comment 4 Dean Jackson 2012-10-23 14:36:47 PDT
Comment on attachment 169759 [details]
Patch

I'm not sure this is the right thing to do, but I'll r+ so that we can live on it for a while. Sometimes I think a flash is better than nothing.
Comment 5 WebKit Review Bot 2012-10-23 14:45:59 PDT
Comment on attachment 169759 [details]
Patch

Clearing flags on attachment: 169759

Committed r132270: <http://trac.webkit.org/changeset/132270>
Comment 6 WebKit Review Bot 2012-10-23 14:46:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Dongseong Hwang 2012-10-23 14:48:13 PDT
(In reply to comment #4)
> (From update of attachment 169759 [details])
> I'm not sure this is the right thing to do, but I'll r+ so that we can live on it for a while. Sometimes I think a flash is better than nothing.

Thank you for your review. I think so, it is not the best way. We will find more proper solution.