Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: Source/WebCore/platform/graphics/chromium/ShaderChromium.h

Issue 7590009: Merge 92255 - Source/WebCore: [Chromium] Use edge-distance method for layer anti-aliasing. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/platform/graphics/chromium/ShaderChromium.h
===================================================================
--- Source/WebCore/platform/graphics/chromium/ShaderChromium.h (revision 92714)
+++ Source/WebCore/platform/graphics/chromium/ShaderChromium.h (working copy)
@@ -96,21 +96,21 @@
int m_texTransformLocation;
};
-class VertexShaderQuad {
+class VertexShaderTile {
public:
- VertexShaderQuad();
+ VertexShaderTile();
void init(GraphicsContext3D*, unsigned program);
String getShaderString() const;
int matrixLocation() const { return m_matrixLocation; }
- int texTransformLocation() const { return m_texTransformLocation; }
int pointLocation() const { return m_pointLocation; }
+ int vertexTexTransformLocation() const { return m_vertexTexTransformLocation; }
private:
int m_matrixLocation;
- int m_texTransformLocation;
int m_pointLocation;
+ int m_vertexTexTransformLocation;
};
class FragmentTexAlphaBinding {
@@ -142,6 +142,34 @@
String getShaderString() const;
};
+class FragmentTexAlphaAABinding {
+public:
+ FragmentTexAlphaAABinding();
+
+ void init(GraphicsContext3D*, unsigned program);
+ int alphaLocation() const { return m_alphaLocation; }
+ int samplerLocation() const { return m_samplerLocation; }
+ int fragmentTexTransformLocation() const { return m_fragmentTexTransformLocation; }
+ int edgeLocation() const { return m_edgeLocation; }
+
+private:
+ int m_samplerLocation;
+ int m_alphaLocation;
+ int m_fragmentTexTransformLocation;
+ int m_edgeLocation;
+};
+
+class FragmentShaderRGBATexAlphaAA : public FragmentTexAlphaAABinding {
+public:
+ String getShaderString() const;
+};
+
+// Swizzles the red and blue component of sampled texel.
+class FragmentShaderRGBATexSwizzleAlphaAA : public FragmentTexAlphaAABinding {
+public:
+ String getShaderString() const;
+};
+
class FragmentShaderRGBATexAlphaMask {
public:
FragmentShaderRGBATexAlphaMask();

Powered by Google App Engine
This is Rietveld 408576698