summaryrefslogtreecommitdiff
path: root/platform/macos
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-04-02 16:34:32 +0200
committerKonstantin Käfer <mail@kkaefer.com>2019-04-05 11:49:17 +0200
commit5cc3d7a73328d6df9c16d27d6aca5b49ba085351 (patch)
tree0e8b9d6938846bf12ea63b1568c96852501a68cc /platform/macos
parent4053776c27cde354acc36c27120c54427087721b (diff)
downloadqtlocation-mapboxgl-5cc3d7a73328d6df9c16d27d6aca5b49ba085351.tar.gz
[core] move GLContextMode to RendererBackend
Diffstat (limited to 'platform/macos')
-rw-r--r--platform/macos/src/MGLMapView.mm11
1 files changed, 7 insertions, 4 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index 589d866782..e9259cf907 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -286,7 +286,7 @@ public:
_mbglThreadPool = mbgl::sharedThreadPool();
MGLRendererConfiguration *config = [MGLRendererConfiguration currentConfiguration];
- auto renderer = std::make_unique<mbgl::Renderer>(*_mbglView, config.scaleFactor, *_mbglThreadPool, config.contextMode, config.cacheDir, config.localFontFamilyName);
+ auto renderer = std::make_unique<mbgl::Renderer>(*_mbglView, config.scaleFactor, *_mbglThreadPool, config.cacheDir, config.localFontFamilyName);
BOOL enableCrossSourceCollisions = !config.perSourceCollisions;
_rendererFrontend = std::make_unique<MGLRenderFrontend>(std::move(renderer), self, *_mbglView, true);
@@ -3060,9 +3060,12 @@ class MGLMapViewImpl : public mbgl::gl::RendererBackend,
public mbgl::gfx::Renderable,
public mbgl::MapObserver {
public:
- MGLMapViewImpl(MGLMapView *nativeView_) : mbgl::gfx::Renderable(
- nativeView_.framebufferSize,
- std::make_unique<MGLMapViewRenderable>(*this)), nativeView(nativeView_) {}
+ MGLMapViewImpl(MGLMapView* nativeView_)
+ : mbgl::gl::RendererBackend(mbgl::gfx::ContextMode::Unique),
+ mbgl::gfx::Renderable(nativeView_.framebufferSize,
+ std::make_unique<MGLMapViewRenderable>(*this)),
+ nativeView(nativeView_) {
+ }
void onCameraWillChange(mbgl::MapObserver::CameraChangeMode mode) override {
bool animated = mode == mbgl::MapObserver::CameraChangeMode::Animated;