diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-02-08 17:53:05 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-02-08 17:53:05 +0100 |
commit | 153d8512b7c0bc5ee80e26c868fb52dd66ee62cc (patch) | |
tree | 821349520909225e8a2a138a500b0544970f870c /platform/default/mbgl/gl/headless_frontend.cpp | |
parent | 4498917a3b9dbf6cc9728da01f479a027f27f902 (diff) | |
download | qtlocation-mapboxgl-upstream/glcontextmode.tar.gz |
[core] allow disabling the use of extensions via GLContextModeupstream/glcontextmode
Diffstat (limited to 'platform/default/mbgl/gl/headless_frontend.cpp')
-rw-r--r-- | platform/default/mbgl/gl/headless_frontend.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/platform/default/mbgl/gl/headless_frontend.cpp b/platform/default/mbgl/gl/headless_frontend.cpp index 4263d2b148..16c477dd00 100644 --- a/platform/default/mbgl/gl/headless_frontend.cpp +++ b/platform/default/mbgl/gl/headless_frontend.cpp @@ -11,18 +11,26 @@ HeadlessFrontend::HeadlessFrontend(float pixelRatio_, FileSource& fileSource, Sc : HeadlessFrontend({ 256, 256 }, pixelRatio_, fileSource, scheduler, programCacheDir, mode, localFontFamily) { } -HeadlessFrontend::HeadlessFrontend(Size size_, float pixelRatio_, FileSource& fileSource, Scheduler& scheduler, const optional<std::string> programCacheDir, GLContextMode mode, const optional<std::string> localFontFamily) +HeadlessFrontend::HeadlessFrontend(Size size_, + float pixelRatio_, + FileSource& fileSource, + Scheduler& scheduler, + const optional<std::string> programCacheDir, + GLContextMode mode, + const optional<std::string> localFontFamily) : size(size_), - pixelRatio(pixelRatio_), - backend({ static_cast<uint32_t>(size.width * pixelRatio), - static_cast<uint32_t>(size.height * pixelRatio) }), - asyncInvalidate([this] { - if (renderer && updateParameters) { - mbgl::BackendScope guard { backend }; - renderer->render(*updateParameters); - } - }), - renderer(std::make_unique<Renderer>(backend, pixelRatio, fileSource, scheduler, mode, programCacheDir, localFontFamily)) { + pixelRatio(pixelRatio_), + backend({ static_cast<uint32_t>(size.width * pixelRatio), + static_cast<uint32_t>(size.height * pixelRatio) }, + mode), + asyncInvalidate([this] { + if (renderer && updateParameters) { + mbgl::BackendScope guard{ backend }; + renderer->render(*updateParameters); + } + }), + renderer(std::make_unique<Renderer>( + backend, pixelRatio, fileSource, scheduler, mode, programCacheDir, localFontFamily)) { } HeadlessFrontend::~HeadlessFrontend() = default; |