diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-04-01 16:56:24 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-04-05 11:49:17 +0200 |
commit | 66c020034e8260e5e071481e68ab61cd264723ba (patch) | |
tree | b5263772d72175474d91ce2daa9dc037b99fab0d /platform/qt/src/headless_backend_qt.cpp | |
parent | a782a6d15b80dd83105604f3f779f6c83ba222e5 (diff) | |
download | qtlocation-mapboxgl-66c020034e8260e5e071481e68ab61cd264723ba.tar.gz |
[core] refactor RendererBackend
Diffstat (limited to 'platform/qt/src/headless_backend_qt.cpp')
-rw-r--r-- | platform/qt/src/headless_backend_qt.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/platform/qt/src/headless_backend_qt.cpp b/platform/qt/src/headless_backend_qt.cpp index 3702fdf14a..1d62afabff 100644 --- a/platform/qt/src/headless_backend_qt.cpp +++ b/platform/qt/src/headless_backend_qt.cpp @@ -6,21 +6,22 @@ #include <cassert> namespace mbgl { +namespace gl { -class QtBackendImpl : public HeadlessBackend::Impl { +class QtBackendImpl final : public HeadlessBackend::Impl { public: - ~QtBackendImpl() final = default; + ~QtBackendImpl() = default; - gl::ProcAddress getExtensionFunctionPointer(const char* name) final { + gl::ProcAddress getExtensionFunctionPointer(const char* name) { QOpenGLContext* thisContext = QOpenGLContext::currentContext(); return thisContext->getProcAddress(name); } - void activateContext() final { + void activateContext() { widget.makeCurrent(); } - void deactivateContext() final { + void deactivateContext() { widget.doneCurrent(); } @@ -33,4 +34,5 @@ void HeadlessBackend::createImpl() { impl = std::make_unique<QtBackendImpl>(); } +} // namespace gl } // namespace mbgl |