[core] Move MapData storage to MapContext

This allows MapData members to hold GL resources which must be released
on the MapContext thread -- necessary for the following commit.
This commit is contained in:
John Firebaugh
2015-11-19 16:08:18 -08:00
parent 40ebf5d0d0
commit 58886842bc
5 changed files with 16 additions and 8 deletions

View File

@@ -13,9 +13,9 @@ TEST(MapContext, DoubleStyleLoad) {
std::shared_ptr<HeadlessDisplay> display = std::make_shared<HeadlessDisplay>();
HeadlessView view(display, 1, 512, 512);
DefaultFileSource fileSource(nullptr);
MapData data(MapMode::Continuous, GLContextMode::Unique, view.getPixelRatio());
util::Thread<MapContext> context({"Map", util::ThreadType::Map, util::ThreadPriority::Regular}, view, fileSource, data);
util::Thread<MapContext> context({"Map", util::ThreadType::Map, util::ThreadPriority::Regular},
view, fileSource, MapMode::Continuous, GLContextMode::Unique, view.getPixelRatio());
context.invokeSync(&MapContext::setStyleJSON, "", "");
context.invokeSync(&MapContext::setStyleJSON, "", "");