Ignore deactivate when no valid EGL display. Fixes #1435

Initialise NativeMapView's EGL variables before Map

Fix hang

Add check for double pause

Add test for double pause
This commit is contained in:
Leith Bade
2015-05-06 12:47:15 +10:00
parent fd099593dc
commit 703e0bc2ee
11 changed files with 161 additions and 96 deletions

View File

@@ -0,0 +1,22 @@
#include "../fixtures/util.hpp"
#include <mbgl/util/run_loop.hpp>
#include <mbgl/map/map_data.hpp>
#include <mbgl/map/map_context.hpp>
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/platform/default/headless_display.hpp>
#include <mbgl/storage/default_file_source.hpp>
using namespace mbgl;
TEST(MapContext, DoubleStyleLoad) {
util::RunLoop runLoop(uv_default_loop());
std::shared_ptr<HeadlessDisplay> display = std::make_shared<HeadlessDisplay>();
HeadlessView view(display, 512, 512, 1);
DefaultFileSource fileSource(nullptr);
MapData data(view, MapMode::Continuous);
MapContext context(uv_default_loop(), view, fileSource, data);
context.setStyleJSON("", "");
context.setStyleJSON("", "");
}