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.
Created attachment 169759 [details] Patch
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.
(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 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 on attachment 169759 [details] Patch Clearing flags on attachment: 169759 Committed r132270: <http://trac.webkit.org/changeset/132270>
All reviewed patches have been landed. Closing bug.
(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.