diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-05-13 10:56:57 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-05-13 10:59:31 +0200 |
commit | b76ea0b162456c7f7154af50b8ba4753dee29b3a (patch) | |
tree | eb2dd414aa76bec3eaed99499bde124862c510f1 /customcontext | |
parent | dc64cf174b5c19be9be1bdc34ce58d28893e576b (diff) |
Make it possible to force disable distancefields text
This requires that the symbol is exported from declarative
but on embedded that is usually not needed.
Change-Id: Ie73bb67c569a70f2252dd8ca1e8de1baa0f1bab6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'customcontext')
-rw-r--r-- | customcontext/context.cpp | 14 | ||||
-rw-r--r-- | customcontext/context.h | 4 | ||||
-rw-r--r-- | customcontext/customcontext.pro | 11 |
3 files changed, 29 insertions, 0 deletions
diff --git a/customcontext/context.cpp b/customcontext/context.cpp index 2769f28..de9df5b 100644 --- a/customcontext/context.cpp +++ b/customcontext/context.cpp @@ -54,6 +54,7 @@ #include <private/qsgdefaultimagenode_p.h> #include <private/qsgdefaultrectanglenode_p.h> #include <private/qsgdistancefieldglyphnode_p_p.h> +#include <private/qsgdefaultglyphnode_p.h> #ifdef CUSTOMCONTEXT_ANIMATIONDRIVER #include "animation/animationdriver.h" @@ -171,6 +172,10 @@ Context::Context(QObject *parent) qDebug(" - ordered 2x2 dither: %s", m_dither ? "yes" : "no"); #endif +#ifdef CUSTOMCONTEXT_NO_DFGLYPHS + qDebug(" - distance fields disabled"); +#endif + #endif } @@ -391,4 +396,13 @@ void Context::renderNextFrame(QSGRenderer *renderer, GLuint fbo) +#ifdef CUSTOMCONTEXT_NO_DFGLYPHS +QSGGlyphNode *Context::createGlyphNode() +{ + return new QSGDefaultGlyphNode(); +} +#endif + + + } // namespace diff --git a/customcontext/context.h b/customcontext/context.h index 493adf6..6e4158e 100644 --- a/customcontext/context.h +++ b/customcontext/context.h @@ -80,6 +80,10 @@ public: QSGTexture *createTexture(const QImage &image) const; QQuickTextureFactory *createTextureFactory(const QImage &image); +#ifdef CUSTOMCONTEXT_NO_DFGLYPHS + QSGGlyphNode *createGlyphNode(); +#endif + private: int m_sampleCount; diff --git a/customcontext/customcontext.pro b/customcontext/customcontext.pro index 2443360..26392b9 100644 --- a/customcontext/customcontext.pro +++ b/customcontext/customcontext.pro @@ -120,6 +120,10 @@ overlaprenderer:{ +############################################################ +# +# Other stuff +# materialpreload:{ message("materialpreload ..........: yes") @@ -128,6 +132,13 @@ materialpreload:{ message("materialpreload ..........: no") } +nodfglyphs:{ + message("nodfglyphs ...............: yes") + DEFINES += CUSTOMCONTEXT_NO_DFGLYPHS +} else { + message("nodfglyphs ...............: no") +} + message(""); |