Make pixelRatio constant across a Map object lifetime

also moves framebuffer size out of TransformState into its own object
This commit is contained in:
Konstantin Käfer
2015-07-01 12:39:21 +02:00
parent 3a07cb2f1e
commit 675ddddee7
40 changed files with 308 additions and 214 deletions

View File

@@ -23,12 +23,12 @@ public:
MockMapContext(View& view,
FileSource& fileSource,
const std::function<void(std::exception_ptr error)>& callback)
: data_(MapMode::Still),
: data_(MapMode::Still, view.getPixelRatio()),
transform_(view),
callback_(callback) {
util::ThreadContext::setFileSource(&fileSource);
transform_.resize(1000, 1000, 1.0, 1000, 1000);
transform_.resize({{ 1000, 1000 }});
transform_.setLatLngZoom({0, 0}, 16);
const std::string style = util::read_file("test/fixtures/resources/style.json");