[Texmap] Add const-ness to TextureMapperShaderManager
authoryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Feb 2012 02:41:41 +0000 (02:41 +0000)
committeryael.aharon@nokia.com <yael.aharon@nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Feb 2012 02:41:41 +0000 (02:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=79545

Reviewed by Noam Rosenthal.

Add const to new methods.
No new tests.

* platform/graphics/texmap/TextureMapperShaderManager.cpp:
(WebCore::TextureMapperShaderProgramSimple::vertexShaderSource):
(WebCore::TextureMapperShaderProgramSimple::fragmentShaderSource):
(WebCore::TextureMapperShaderProgramOpacityAndMask::vertexShaderSource):
(WebCore::TextureMapperShaderProgramOpacityAndMask::fragmentShaderSource):
* platform/graphics/texmap/TextureMapperShaderManager.h:
(WebCore::TextureMapperShaderProgram::matrixVariable):
(WebCore::TextureMapperShaderProgram::sourceMatrixVariable):
(WebCore::TextureMapperShaderProgram::sourceTextureVariable):
(WebCore::TextureMapperShaderProgram::opacityVariable):
(TextureMapperShaderProgram):
(TextureMapperShaderProgramSimple):
(WebCore::TextureMapperShaderProgramOpacityAndMask::maskMatrixVariable):
(WebCore::TextureMapperShaderProgramOpacityAndMask::maskTextureVariable):
(TextureMapperShaderProgramOpacityAndMask):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@108882 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h

index 01e4196..0d4184d 100644 (file)
@@ -1,3 +1,29 @@
+2012-02-24  Yael Aharon  <yael.aharon@nokia.com>
+
+        [Texmap] Add const-ness to TextureMapperShaderManager
+        https://bugs.webkit.org/show_bug.cgi?id=79545
+
+        Reviewed by Noam Rosenthal.
+        
+        Add const to new methods.
+        No new tests.
+
+        * platform/graphics/texmap/TextureMapperShaderManager.cpp:
+        (WebCore::TextureMapperShaderProgramSimple::vertexShaderSource):
+        (WebCore::TextureMapperShaderProgramSimple::fragmentShaderSource):
+        (WebCore::TextureMapperShaderProgramOpacityAndMask::vertexShaderSource):
+        (WebCore::TextureMapperShaderProgramOpacityAndMask::fragmentShaderSource):
+        * platform/graphics/texmap/TextureMapperShaderManager.h:
+        (WebCore::TextureMapperShaderProgram::matrixVariable):
+        (WebCore::TextureMapperShaderProgram::sourceMatrixVariable):
+        (WebCore::TextureMapperShaderProgram::sourceTextureVariable):
+        (WebCore::TextureMapperShaderProgram::opacityVariable):
+        (TextureMapperShaderProgram):
+        (TextureMapperShaderProgramSimple):
+        (WebCore::TextureMapperShaderProgramOpacityAndMask::maskMatrixVariable):
+        (WebCore::TextureMapperShaderProgramOpacityAndMask::maskTextureVariable):
+        (TextureMapperShaderProgramOpacityAndMask):
+
 2012-02-24  Tom Sepez  <tsepez@chromium.org>
 
         XSS Auditor targeting legitimate frames as false positives.
index 245b573..9e52ca2 100644 (file)
@@ -146,12 +146,12 @@ TextureMapperShaderProgramSimple::TextureMapperShaderProgramSimple()
     getUniformLocation(m_opacityVariable, "Opacity");
 }
 
-const char* TextureMapperShaderProgramSimple::vertexShaderSource()
+const char* TextureMapperShaderProgramSimple::vertexShaderSource() const
 {
     return vertexShaderSourceSimple;
 }
 
-const char* TextureMapperShaderProgramSimple::fragmentShaderSource()
+const char* TextureMapperShaderProgramSimple::fragmentShaderSource() const
 {
     return fragmentShaderSourceSimple;
 }
@@ -177,12 +177,12 @@ TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMa
     getUniformLocation(m_opacityVariable, "Opacity");
 }
 
-const char* TextureMapperShaderProgramOpacityAndMask::vertexShaderSource()
+const char* TextureMapperShaderProgramOpacityAndMask::vertexShaderSource() const
 {
     return vertexShaderSourceOpacityAndMask;
 }
 
-const char* TextureMapperShaderProgramOpacityAndMask::fragmentShaderSource()
+const char* TextureMapperShaderProgramOpacityAndMask::fragmentShaderSource() const
 {
     return fragmentShaderSourceOpacityAndMask;
 }
index 1f0b5c5..4502e7e 100644 (file)
@@ -53,16 +53,16 @@ public:
     }
 
     virtual void prepare(float opacity, const BitmapTexture*) { }
-    GLint matrixVariable() { return m_matrixVariable; }
-    GLint sourceMatrixVariable() { return m_sourceMatrixVariable; }
-    GLint sourceTextureVariable() { return m_sourceTextureVariable; }
-    GLint opacityVariable() { return m_opacityVariable; }
+    GLint matrixVariable() const { return m_matrixVariable; }
+    GLint sourceMatrixVariable() const { return m_sourceMatrixVariable; }
+    GLint sourceTextureVariable() const { return m_sourceTextureVariable; }
+    GLint opacityVariable() const { return m_opacityVariable; }
 
 protected:
     void getUniformLocation(GLint& var, const char* name);
     void initializeProgram();
-    virtual const char* vertexShaderSource() = 0;
-    virtual const char* fragmentShaderSource() = 0;
+    virtual const char* vertexShaderSource() const = 0;
+    virtual const char* fragmentShaderSource() const = 0;
 
     GLuint m_id;
     GLuint m_vertexAttrib;
@@ -80,8 +80,8 @@ public:
     virtual void prepare(float opacity, const BitmapTexture*);
 
 private:
-    virtual const char* vertexShaderSource();
-    virtual const char* fragmentShaderSource();
+    virtual const char* vertexShaderSource() const;
+    virtual const char* fragmentShaderSource() const;
     TextureMapperShaderProgramSimple();
 };
 
@@ -89,13 +89,13 @@ class TextureMapperShaderProgramOpacityAndMask : public TextureMapperShaderProgr
 public:
     static PassRefPtr<TextureMapperShaderProgramOpacityAndMask> create();
     virtual void prepare(float opacity, const BitmapTexture*);
-    GLint maskMatrixVariable() { return m_maskMatrixVariable; }
-    GLint maskTextureVariable() { return m_maskTextureVariable; }
+    GLint maskMatrixVariable() const { return m_maskMatrixVariable; }
+    GLint maskTextureVariable() const { return m_maskTextureVariable; }
 
 private:
     static int m_classID;
-    virtual const char* vertexShaderSource();
-    virtual const char* fragmentShaderSource();
+    virtual const char* vertexShaderSource() const;
+    virtual const char* fragmentShaderSource() const;
     TextureMapperShaderProgramOpacityAndMask();
     GLint m_maskMatrixVariable;
     GLint m_maskTextureVariable;