diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-01-03 08:09:55 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-01-21 14:13:42 +0000 |
commit | 9e3c46961a5f48c3a704b0147e1f073f7516da9c (patch) | |
tree | 52a4ae0314dd36949d909b7d2e5d0c8830261a43 /src/quick/scenegraph/qsgadaptationlayer.cpp | |
parent | 8fd3cfe7d0f39a731c585334299f5160ad952df9 (diff) |
Remove reference to OpenGL from distance field cache superclass
QSGDefaultDistanceFieldGlyphCache is the OpenGL-specific implementation,
but for some reason the core profile flag was stored in the superclass.
It is ever only used from QSGDefaultDistanceFieldGlyphCache and the
rest of the superclass has no OpenGL-dependency, so we just move it.
This is needed to be able to share the generic QSGDistanceFieldGlyphCache
with Qt 3D Runtime, where there is no current OpenGL context when the
scene graph is built and resources have to be allocated through an
abstraction layer in Qt 3D.
Task-number: QT3DS-1419
Change-Id: I7f4e26eecc21635ff81030b32ecc89c6dc4fcfbe
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgadaptationlayer.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgadaptationlayer.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp index c99e149aa5..252e5a9c55 100644 --- a/src/quick/scenegraph/qsgadaptationlayer.cpp +++ b/src/quick/scenegraph/qsgadaptationlayer.cpp @@ -56,7 +56,7 @@ static QElapsedTimer qsg_render_timer; QSGDistanceFieldGlyphCache::Texture QSGDistanceFieldGlyphCache::s_emptyTexture; -QSGDistanceFieldGlyphCache::QSGDistanceFieldGlyphCache(QOpenGLContext *c, const QRawFont &font) +QSGDistanceFieldGlyphCache::QSGDistanceFieldGlyphCache(const QRawFont &font) : m_pendingGlyphs(64) { Q_ASSERT(font.isValid()); @@ -71,11 +71,6 @@ QSGDistanceFieldGlyphCache::QSGDistanceFieldGlyphCache(QOpenGLContext *c, const // this allows us to call pathForGlyph once and reuse the result. m_referenceFont.setPixelSize(QT_DISTANCEFIELD_BASEFONTSIZE(m_doubleGlyphResolution) * QT_DISTANCEFIELD_SCALE(m_doubleGlyphResolution)); Q_ASSERT(m_referenceFont.isValid()); -#if QT_CONFIG(opengl) - m_coreProfile = (c->format().profile() == QSurfaceFormat::CoreProfile); -#else - Q_UNUSED(c) -#endif } QSGDistanceFieldGlyphCache::~QSGDistanceFieldGlyphCache() |