[core] Don't copy TransformState (#3501)

This commit is contained in:
Thiago Marcos P. Santos
2016-04-15 22:17:19 +03:00
committed by John Firebaugh
parent 1ee0055710
commit d51944fbea
4 changed files with 7 additions and 12 deletions

View File

@@ -71,7 +71,6 @@ public:
Map::StillImageCallback callback;
size_t sourceCacheSize;
TransformState transformState;
TimePoint timePoint;
bool loading = false;
};
@@ -147,9 +146,7 @@ void Map::update(Update flags) {
impl->transform.resize(impl->view.getSize());
}
impl->transformState = impl->transform.getState();
impl->updateFlags |= flags;
impl->asyncUpdate.send();
}
@@ -214,13 +211,13 @@ void Map::Impl::update() {
}
if (updateFlags & Update::Classes || updateFlags & Update::RecalculateStyle) {
style->recalculate(transformState.getZoom(), timePoint, mode);
style->recalculate(transform.getZoom(), timePoint, mode);
}
StyleUpdateParameters parameters(pixelRatio,
debugOptions,
timePoint,
transformState,
transform.getState(),
style->workers,
fileSource,
*texturePool,
@@ -243,10 +240,8 @@ void Map::Impl::update() {
}
void Map::Impl::render() {
transformState = transform.getState();
if (!painter) {
painter = std::make_unique<Painter>(transformState, glObjectStore);
painter = std::make_unique<Painter>(transform.getState(), glObjectStore);
}
FrameData frameData { view.getFramebufferSize(),