From dc62227da7eaa88c7d305ebd3c16d6567209d630 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Tue, 19 Jul 2011 12:14:39 +0200 Subject: Renamed the Bindable class to QSGBindable. Change-Id: Id00868bd0ea93010912f06fba67624fb325ecc41 Reviewed-on: http://codereview.qt.nokia.com/1818 Reviewed-by: Kim M. Kalland Reviewed-by: Qt Sanity Bot --- src/declarative/items/qsgshadereffectsource.cpp | 6 +++--- src/declarative/scenegraph/coreapi/qsgrenderer.cpp | 12 ++++++------ src/declarative/scenegraph/coreapi/qsgrenderer_p.h | 16 ++++++++-------- src/declarative/scenegraph/qsgcontext.cpp | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/declarative/items/qsgshadereffectsource.cpp b/src/declarative/items/qsgshadereffectsource.cpp index 3be8744fdb..4803ca0a60 100644 --- a/src/declarative/items/qsgshadereffectsource.cpp +++ b/src/declarative/items/qsgshadereffectsource.cpp @@ -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)); } } diff --git a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp index cf86b04a12..e5c6bfb4f8 100644 --- a/src/declarative/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/declarative/scenegraph/coreapi/qsgrenderer.cpp @@ -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; diff --git a/src/declarative/scenegraph/coreapi/qsgrenderer_p.h b/src/declarative/scenegraph/coreapi/qsgrenderer_p.h index e59296a8cf..3fdcf06a08 100644 --- a/src/declarative/scenegraph/coreapi/qsgrenderer_p.h +++ b/src/declarative/scenegraph/coreapi/qsgrenderer_p.h @@ -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; diff --git a/src/declarative/scenegraph/qsgcontext.cpp b/src/declarative/scenegraph/qsgcontext.cpp index 2148cf76ef..c5e4a7de24 100644 --- a/src/declarative/scenegraph/qsgcontext.cpp +++ b/src/declarative/scenegraph/qsgcontext.cpp @@ -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(); -- cgit v1.2.3