summaryrefslogtreecommitdiff
path: root/test/util
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-10 12:36:53 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-11-17 01:01:15 +0100
commit50f0f919c38a905b8b169fcbd3e77c03bf48d17b (patch)
treee5b798dcca7afabf89f80c9c4810861c22db13e5 /test/util
parent5479b75c9fa971332aadfede6b380267eebbd566 (diff)
downloadqtlocation-mapboxgl-50f0f919c38a905b8b169fcbd3e77c03bf48d17b.tar.gz
[test] Use shared headless display
Prevents some OpenGL implementations from bailing out.
Diffstat (limited to 'test/util')
-rw-r--r--test/util/memory.test.cpp2
-rw-r--r--test/util/offscreen_texture.test.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/util/memory.test.cpp b/test/util/memory.test.cpp
index 07927b43eb..bd67e2c26b 100644
--- a/test/util/memory.test.cpp
+++ b/test/util/memory.test.cpp
@@ -56,7 +56,7 @@ public:
}
util::RunLoop runLoop;
- HeadlessBackend backend;
+ HeadlessBackend backend { test::sharedDisplay() };
OffscreenView view{ backend.getContext(), { 512, 512 } };
StubFileSource fileSource;
ThreadPool threadPool { 4 };
diff --git a/test/util/offscreen_texture.test.cpp b/test/util/offscreen_texture.test.cpp
index 683a4e6095..9a07f4f3bf 100644
--- a/test/util/offscreen_texture.test.cpp
+++ b/test/util/offscreen_texture.test.cpp
@@ -10,7 +10,7 @@
using namespace mbgl;
TEST(OffscreenTexture, EmptyRed) {
- HeadlessBackend backend;
+ HeadlessBackend backend { test::sharedDisplay() };
OffscreenView view(backend.getContext(), { 512, 256 });
view.bind();
@@ -67,7 +67,7 @@ struct Buffer {
TEST(OffscreenTexture, RenderToTexture) {
- HeadlessBackend backend;
+ HeadlessBackend backend { test::sharedDisplay() };
auto& context = backend.getContext();
MBGL_CHECK_ERROR(glEnable(GL_BLEND));