[qt] manage backendscope in renderer frontend

This commit is contained in:
Ivo van Dongen
2017-07-25 11:16:39 +03:00
committed by Ivo van Dongen
parent 9893b3d071
commit 4dee3a0d8d
4 changed files with 11 additions and 8 deletions

View File

@@ -1446,9 +1446,6 @@ void QMapboxGL::render()
}
#endif
// The OpenGL implementation automatically enables the OpenGL context for us.
mbgl::BackendScope scope { *d_ptr, mbgl::BackendScope::ScopeType::Implicit };
d_ptr->dirty = false;
d_ptr->render();
}
@@ -1505,6 +1502,7 @@ QMapboxGLPrivate::QMapboxGLPrivate(QMapboxGL *q, const QMapboxGLSettings &settin
frontend = std::make_unique<QMapboxGLRendererFrontend>(
std::make_unique<mbgl::Renderer>(*this, pixelRatio, *fileSourceObj, *threadPool,
static_cast<mbgl::GLContextMode>(settings.contextMode())),
*this,
*this);
connect(frontend.get(), SIGNAL(updated()), this, SLOT(invalidate()));