Skip to content
  • michelangelo@webkit.org's avatar
    [CSS Shaders] u_textureSize uniform should be set to the size of the texture. · 65db9806
    michelangelo@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=95914
    
    Reviewed by Dean Jackson.
    
    Source/WebCore:
    
    This adds support for the following shader uniform variables:
    
        uniform vec2 u_textureSize
        uniform vec4 u_meshBox
        uniform vec2 u_tileSize
        uniform vec2 u_meshSize
    
    The relevant section of the specification is:
    http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-uniform-variables
    
    Tests: css3/filters/custom/custom-filter-u-mesh-box.html
           css3/filters/custom/custom-filter-u-mesh-size.html
           css3/filters/custom/custom-filter-u-texture-size.html
           css3/filters/custom/custom-filter-u-tile-size.html
    
    * platform/graphics/filters/FECustomFilter.cpp:
    (WebCore::FECustomFilter::bindProgramAndBuffers):
    
    LayoutTests:
    
    Tests for the following uniform variables:
        uniform vec2 u_textureSize
        uniform vec4 u_meshBox
        uniform vec2 u_tileSize
        uniform vec2 u_meshSize
    
    The relevant section of the specification is:
    http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-uniform-variables
    
    * css3/filters/custom/custom-filter-u-mesh-box-expected.html: Added.
    * css3/filters/custom/custom-filter-u-mesh-box.html: Added.
    * css3/filters/custom/custom-filter-u-mesh-size-expected.html: Added.
    * css3/filters/custom/custom-filter-u-mesh-size.html: Added.
    * css3/filters/custom/custom-filter-u-texture-size-expected.html: Added.
    * css3/filters/custom/custom-filter-u-texture-size.html: Added.
    * css3/filters/custom/custom-filter-u-tile-size-expected.html: Added.
    * css3/filters/custom/custom-filter-u-tile-size.html: Added.
    * css3/filters/resources/u-mesh-box-is-unit-square.fs: Added.
    * css3/filters/resources/u-mesh-size.fs: Added.
    * css3/filters/resources/u-texture-size.fs: Added.
    * css3/filters/resources/u-tile-size.fs: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    65db9806