diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-11-10 12:36:53 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-11-17 01:01:15 +0100 |
commit | 50f0f919c38a905b8b169fcbd3e77c03bf48d17b (patch) | |
tree | e5b798dcca7afabf89f80c9c4810861c22db13e5 /test/api/api_misuse.test.cpp | |
parent | 5479b75c9fa971332aadfede6b380267eebbd566 (diff) | |
download | qtlocation-mapboxgl-50f0f919c38a905b8b169fcbd3e77c03bf48d17b.tar.gz |
[test] Use shared headless display
Prevents some OpenGL implementations from bailing out.
Diffstat (limited to 'test/api/api_misuse.test.cpp')
-rw-r--r-- | test/api/api_misuse.test.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/api/api_misuse.test.cpp b/test/api/api_misuse.test.cpp index 50a8f38c33..f96bf78612 100644 --- a/test/api/api_misuse.test.cpp +++ b/test/api/api_misuse.test.cpp @@ -14,14 +14,15 @@ using namespace mbgl; + TEST(API, RenderWithoutCallback) { auto log = new FixtureLogObserver(); Log::setObserver(std::unique_ptr<Log::Observer>(log)); util::RunLoop loop; - HeadlessBackend backend; - OffscreenView view(backend.getContext(), { 128, 512 }); + HeadlessBackend backend { test::sharedDisplay() }; + OffscreenView view { backend.getContext(), { 128, 512 } }; StubFileSource fileSource; ThreadPool threadPool(4); @@ -45,8 +46,8 @@ TEST(API, RenderWithoutCallback) { TEST(API, RenderWithoutStyle) { util::RunLoop loop; - HeadlessBackend backend; - OffscreenView view(backend.getContext(), { 128, 512 }); + HeadlessBackend backend { test::sharedDisplay() }; + OffscreenView view { backend.getContext(), { 128, 512 } }; StubFileSource fileSource; ThreadPool threadPool(4); |