| Index: cc/shader.h
|
| diff --git a/cc/shader.h b/cc/shader.h
|
| index 0d929f90f19af9a1fa20f191abee6468a66f8880..f70c318edabce4ee16abd9f9e53dd912b9cc5fd4 100644
|
| --- a/cc/shader.h
|
| +++ b/cc/shader.h
|
| @@ -134,7 +134,7 @@ public:
|
| void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUniform, int* baseUniformIndex);
|
| int alphaLocation() const { return m_alphaLocation; }
|
| int edgeLocation() const { return -1; }
|
| - int fragmentTexTransformLocation() const { return -1; }
|
| + int fragmentTexClampLocation() const { return -1; }
|
| int samplerLocation() const { return m_samplerLocation; }
|
|
|
| private:
|
| @@ -142,6 +142,22 @@ private:
|
| int m_alphaLocation;
|
| };
|
|
|
| +class FragmentTexClampAlphaBinding {
|
| +public:
|
| + FragmentTexClampAlphaBinding();
|
| +
|
| + void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUniform, int* baseUniformIndex);
|
| + int alphaLocation() const { return m_alphaLocation; }
|
| + int edgeLocation() const { return -1; }
|
| + int fragmentTexClampLocation() const { return m_fragmentTexClampLocation; }
|
| + int samplerLocation() const { return m_samplerLocation; }
|
| +
|
| +private:
|
| + int m_samplerLocation;
|
| + int m_alphaLocation;
|
| + int m_fragmentTexClampLocation;
|
| +};
|
| +
|
| class FragmentTexOpaqueBinding {
|
| public:
|
| FragmentTexOpaqueBinding();
|
| @@ -149,13 +165,28 @@ public:
|
| void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUniform, int* baseUniformIndex);
|
| int alphaLocation() const { return -1; }
|
| int edgeLocation() const { return -1; }
|
| - int fragmentTexTransformLocation() const { return -1; }
|
| + int fragmentTexClampLocation() const { return -1; }
|
| int samplerLocation() const { return m_samplerLocation; }
|
|
|
| private:
|
| int m_samplerLocation;
|
| };
|
|
|
| +class FragmentTeClampOpaqueBinding {
|
| +public:
|
| + FragmentTexClampOpaqueBinding();
|
| +
|
| + void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUniform, int* baseUniformIndex);
|
| + int alphaLocation() const { return -1; }
|
| + int edgeLocation() const { return -1; }
|
| + int fragmentTexClampLocation() const { m_fragmentTexClampLocation; }
|
| + int samplerLocation() const { return m_samplerLocation; }
|
| +
|
| +private:
|
| + int m_samplerLocation;
|
| + int m_fragmentTexClampLocation;
|
| +};
|
| +
|
| class FragmentShaderRGBATexFlipVaryingAlpha : public FragmentTexOpaqueBinding {
|
| public:
|
| std::string getShaderString() const;
|
| @@ -171,6 +202,11 @@ public:
|
| std::string getShaderString() const;
|
| };
|
|
|
| +class FragmentShaderRGBATexAlpha : public FragmentTexClampAlphaBinding {
|
| +public:
|
| + std::string getShaderString() const;
|
| +};
|
| +
|
| class FragmentShaderRGBATexRectFlipVaryingAlpha : public FragmentTexAlphaBinding {
|
| public:
|
| std::string getShaderString() const;
|
| @@ -181,7 +217,7 @@ public:
|
| std::string getShaderString() const;
|
| };
|
|
|
| -class FragmentShaderRGBATexOpaque : public FragmentTexOpaqueBinding {
|
| +class FragmentShaderRGBATexClampOpaque : public FragmentTexClampOpaqueBinding {
|
| public:
|
| std::string getShaderString() const;
|
| };
|
| @@ -192,13 +228,13 @@ public:
|
| };
|
|
|
| // Swizzles the red and blue component of sampled texel with alpha.
|
| -class FragmentShaderRGBATexSwizzleAlpha : public FragmentTexAlphaBinding {
|
| +class FragmentShaderRGBATexClampSwizzleAlpha : public FragmentTexClampAlphaBinding {
|
| public:
|
| std::string getShaderString() const;
|
| };
|
|
|
| // Swizzles the red and blue component of sampled texel without alpha.
|
| -class FragmentShaderRGBATexSwizzleOpaque : public FragmentTexOpaqueBinding {
|
| +class FragmentShaderRGBATexClampSwizzleOpaque : public FragmentTexClampOpaqueBinding {
|
| public:
|
| std::string getShaderString() const;
|
| };
|
| @@ -236,13 +272,13 @@ public:
|
| void init(WebKit::WebGraphicsContext3D*, unsigned program, bool usingBindUniform, int* baseUniformIndex);
|
| int alphaLocation() const { return m_alphaLocation; }
|
| int samplerLocation() const { return m_samplerLocation; }
|
| - int fragmentTexTransformLocation() const { return m_fragmentTexTransformLocation; }
|
| + int fragmentTexClampLocation() const { return m_fragmentTexClampLocation; }
|
| int edgeLocation() const { return m_edgeLocation; }
|
|
|
| private:
|
| int m_samplerLocation;
|
| int m_alphaLocation;
|
| - int m_fragmentTexTransformLocation;
|
| + int m_fragmentTexClampLocation;
|
| int m_edgeLocation;
|
| };
|
|
|
|
|