Renamed the Bindable class to QSGBindable.
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>
Tue, 19 Jul 2011 10:14:39 +0000 (12:14 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 20 Jul 2011 04:57:44 +0000 (06:57 +0200)
Change-Id: Id00868bd0ea93010912f06fba67624fb325ecc41
Reviewed-on: http://codereview.qt.nokia.com/1818
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>

src/declarative/items/qsgshadereffectsource.cpp
src/declarative/scenegraph/coreapi/qsgrenderer.cpp
src/declarative/scenegraph/coreapi/qsgrenderer_p.h
src/declarative/scenegraph/qsgcontext.cpp

index 3be8744..4803ca0 100644 (file)
@@ -314,7 +314,7 @@ void QSGShaderEffectTexture::grab()
     m_renderer->setClearColor(Qt::transparent);
 
     if (m_multisampling) {
-        m_renderer->renderScene(BindableFbo(m_secondaryFbo));
+        m_renderer->renderScene(QSGBindableFbo(m_secondaryFbo));
 
         if (deleteFboLater) {
             delete m_fbo;
@@ -332,7 +332,7 @@ void QSGShaderEffectTexture::grab()
         QGLFramebufferObject::blitFramebuffer(m_fbo, r, m_secondaryFbo, r);
     } else {
         if (m_recursive) {
-            m_renderer->renderScene(BindableFbo(m_secondaryFbo));
+            m_renderer->renderScene(QSGBindableFbo(m_secondaryFbo));
 
             if (deleteFboLater) {
                 delete m_fbo;
@@ -346,7 +346,7 @@ void QSGShaderEffectTexture::grab()
             }
             qSwap(m_fbo, m_secondaryFbo);
         } else {
-            m_renderer->renderScene(BindableFbo(m_fbo));
+            m_renderer->renderScene(QSGBindableFbo(m_fbo));
         }
     }
 
index cf86b04..e5c6bfb 100644 (file)
@@ -65,7 +65,7 @@ static int updatePassTime;
 static int frameNumber = 0;
 #endif
 
-void Bindable::clear(QSGRenderer::ClearMode mode) const
+void QSGBindable::clear(QSGRenderer::ClearMode mode) const
 {
     GLuint bits = 0;
     if (mode & QSGRenderer::ClearColorBuffer) bits |= GL_COLOR_BUFFER_BIT;
@@ -75,17 +75,17 @@ void Bindable::clear(QSGRenderer::ClearMode mode) const
 }
 
 // Reactivate the color buffer after switching to the stencil.
-void Bindable::reactivate() const
+void QSGBindable::reactivate() const
 {
     glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
 }
 
-BindableFbo::BindableFbo(QGLFramebufferObject *fbo) : m_fbo(fbo)
+QSGBindableFbo::QSGBindableFbo(QGLFramebufferObject *fbo) : m_fbo(fbo)
 {
 }
 
 
-void BindableFbo::bind() const
+void QSGBindableFbo::bind() const
 {
     m_fbo->bind();
 }
@@ -203,7 +203,7 @@ void QSGRenderer::setRootNode(QSGRootNode *node)
 
 void QSGRenderer::renderScene()
 {
-    class B : public Bindable
+    class B : public QSGBindable
     {
     public:
         void bind() const { QGLFramebufferObject::bindDefault(); }
@@ -211,7 +211,7 @@ void QSGRenderer::renderScene()
     renderScene(b);
 }
 
-void QSGRenderer::renderScene(const Bindable &bindable)
+void QSGRenderer::renderScene(const QSGBindable &bindable)
 {
     if (!m_root_node)
         return;
index e59296a..3fdcf06 100644 (file)
@@ -64,7 +64,7 @@ class QSGMaterialShader;
 struct QSGMaterialType;
 class QGLFramebufferObject;
 class TextureReference;
-class Bindable;
+class QSGBindable;
 class QSGNodeUpdater;
 
 
@@ -121,7 +121,7 @@ public:
     QSGContext *context();
 
     void renderScene();
-    void renderScene(const Bindable &bindable);
+    void renderScene(const QSGBindable &bindable);
     virtual void nodeChanged(QSGNode *node, QSGNode::DirtyFlags flags);
     virtual void materialChanged(QSGGeometryNode *node, QSGMaterial *from, QSGMaterial *to);
 
@@ -143,7 +143,7 @@ protected:
     virtual void render() = 0;
     QSGRenderer::ClipType updateStencilClip(const QSGClipNode *clip);
 
-    const Bindable *bindable() const { return m_bindable; }
+    const QSGBindable *bindable() const { return m_bindable; }
 
     virtual void preprocess();
 
@@ -172,7 +172,7 @@ private:
     QGLShaderProgram m_clip_program;
     int m_clip_matrix_id;
 
-    const Bindable *m_bindable;
+    const QSGBindable *m_bindable;
 
     bool m_changed_emitted : 1;
     bool m_mirrored : 1;
@@ -181,19 +181,19 @@ private:
 
 Q_DECLARE_OPERATORS_FOR_FLAGS(QSGRenderer::ClearMode)
 
-class Q_DECLARATIVE_EXPORT Bindable
+class Q_DECLARATIVE_EXPORT QSGBindable
 {
 public:
-    virtual ~Bindable() { }
+    virtual ~QSGBindable() { }
     virtual void bind() const = 0;
     virtual void clear(QSGRenderer::ClearMode mode) const;
     virtual void reactivate() const;
 };
 
-class BindableFbo : public Bindable
+class QSGBindableFbo : public QSGBindable
 {
 public:
-    BindableFbo(QGLFramebufferObject *fbo);
+    QSGBindableFbo(QGLFramebufferObject *fbo);
     virtual void bind() const;
 private:
     QGLFramebufferObject *m_fbo;
index 2148cf7..c5e4a7d 100644 (file)
@@ -255,7 +255,7 @@ void QSGContext::renderNextFrame(QGLFramebufferObject *fbo)
     cleanupTextures();
 
     if (fbo) {
-        BindableFbo bindable(fbo);
+        QSGBindableFbo bindable(fbo);
         d->renderer->renderScene(bindable);
     } else {
         d->renderer->renderScene();