[core] Ensure that a BackendScope exists when doing GL calls
This commit is contained in:
committed by
John Firebaugh
parent
d7227e13a7
commit
8e5214144e
@@ -3,6 +3,7 @@
|
||||
#include <mbgl/test/fixture_log_observer.hpp>
|
||||
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/map/backend_scope.hpp>
|
||||
#include <mbgl/gl/headless_backend.hpp>
|
||||
#include <mbgl/gl/offscreen_view.hpp>
|
||||
#include <mbgl/storage/online_file_source.hpp>
|
||||
@@ -22,6 +23,7 @@ TEST(API, RenderWithoutCallback) {
|
||||
util::RunLoop loop;
|
||||
|
||||
HeadlessBackend backend { test::sharedDisplay() };
|
||||
BackendScope scope { backend };
|
||||
OffscreenView view { backend.getContext(), { 128, 512 } };
|
||||
StubFileSource fileSource;
|
||||
ThreadPool threadPool(4);
|
||||
@@ -47,6 +49,7 @@ TEST(API, RenderWithoutStyle) {
|
||||
util::RunLoop loop;
|
||||
|
||||
HeadlessBackend backend { test::sharedDisplay() };
|
||||
BackendScope scope { backend };
|
||||
OffscreenView view { backend.getContext(), { 128, 512 } };
|
||||
StubFileSource fileSource;
|
||||
ThreadPool threadPool(4);
|
||||
|
||||
Reference in New Issue
Block a user