diff options
author | Andy Nichols <andy.nichols@theqtcompany.com> | 2016-06-28 14:12:30 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2016-06-28 15:13:20 +0000 |
commit | d44e75271cfccde26761ad9ed8accdd872f478d1 (patch) | |
tree | 34b348e08ce19fd2fb6edddd79054d8ac5f7579b /src/quick/scenegraph/util | |
parent | fda948b9932d801759cd7b585ef02de8db94c7f2 (diff) |
Cleanup some unused functions and variables with QT_NO_OPENGL
Without theses additional #ifdefs building with clang fails.
Change-Id: Ib6993b6d14bf73b606e1bcb991f7436a9c4c9638
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/scenegraph/util')
4 files changed, 10 insertions, 2 deletions
diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp index 5d7817163e..2ce27275cd 100644 --- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp @@ -57,9 +57,10 @@ public: private: virtual void initialize(); - +#ifndef QT_NO_OPENGL int m_matrix_id; int m_color_id; +#endif }; QSGMaterialType FlatColorMaterialShader::type; diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp index 19403deb73..4cf339aeb8 100644 --- a/src/quick/scenegraph/util/qsgtexture.cpp +++ b/src/quick/scenegraph/util/qsgtexture.cpp @@ -70,7 +70,9 @@ #include <QHash> #endif +#ifndef QT_NO_OPENGL static QElapsedTimer qsg_renderer_timer; +#endif #ifndef QT_NO_DEBUG static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK"); @@ -84,11 +86,13 @@ static const bool qsg_leak_check = !qEnvironmentVariableIsEmpty("QML_LEAK_CHECK" QT_BEGIN_NAMESPACE +#ifndef QT_NO_OPENGL inline static bool isPowerOfTwo(int x) { // Assumption: x >= 1 return x == (x & -x); } +#endif QSGTexturePrivate::QSGTexturePrivate() : wrapChanged(false) diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp index 3db8163376..119828bc81 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.cpp +++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp @@ -46,11 +46,13 @@ QT_BEGIN_NAMESPACE +#ifndef QT_NO_OPENGL inline static bool isPowerOfTwo(int x) { // Assumption: x >= 1 return x == (x & -x); } +#endif QSGMaterialType QSGOpaqueTextureMaterialShader::type; diff --git a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp index dedbc86385..847ec289d8 100644 --- a/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp +++ b/src/quick/scenegraph/util/qsgvertexcolormaterial.cpp @@ -55,9 +55,10 @@ public: private: virtual void initialize(); - +#ifndef QT_NO_OPENGL int m_matrix_id; int m_opacity_id; +#endif }; QSGMaterialType QSGVertexColorMaterialShader::type; |