[Texmap] Accelerated versions of drop-shadow and blur filters
authornoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2012 18:39:37 +0000 (18:39 +0000)
committernoam.rosenthal@nokia.com <noam.rosenthal@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Jun 2012 18:39:37 +0000 (18:39 +0000)
commit82015c14f7f649edfdfbeff4cc37fc8bfd95ce59
treed313c1b261e2a14e691354a37215c37a527de129
parentc04c80e2cc7aee995892799003f5200ec65fcbe9
[Texmap] Accelerated versions of drop-shadow and blur filters
https://bugs.webkit.org/show_bug.cgi?id=87695

Reviewed by Kenneth Rohde Christiansen.

Added shaders for blur and drop-shadow effects.
The shaders use sampling of multiple coordinates and averaging them with normal-
distribution to create a fast gaussian blur effect.

Covered by existing tests in css3/filters.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawFiltered):
    Call the prepare function explicitly, with a size argument that's used to calculate
    some of the uniform values.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::intermediateSurfaceRect):
    The outsets of the effect have to be considered when calculating the intermediate rect.
    Otherwise the resulting image is scaled instead of outsetted.

(WebCore::applyFilters):
* platform/graphics/texmap/TextureMapperShaderManager.cpp:
(WebCore::StandardFilterProgram::StandardFilterProgram):
    Added the new shaders.

(WebCore::StandardFilterProgram::prepare):
(WebCore::TextureMapperShaderManager::getShaderForFilter):
* platform/graphics/texmap/TextureMapperShaderManager.h:
(StandardFilterProgram):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGL.h
Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h