Get rid of MapData::{get,set}NeedsRepaint
This commit is contained in:
@@ -165,7 +165,6 @@ public:
|
||||
void setDebug(bool value);
|
||||
void toggleDebug();
|
||||
bool getDebug() const;
|
||||
void setNeedsRepaint();
|
||||
void setCollisionDebug(bool value);
|
||||
void toggleCollisionDebug();
|
||||
bool getCollisionDebug() const;
|
||||
|
||||
@@ -350,7 +350,7 @@ void GLFWView::run() {
|
||||
map->renderSync();
|
||||
report(1000 * (glfwGetTime() - started));
|
||||
if (benchmark) {
|
||||
map->setNeedsRepaint();
|
||||
map->update(mbgl::Update::Repaint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,10 +385,6 @@ bool Map::getDebug() const {
|
||||
return data->getDebug();
|
||||
}
|
||||
|
||||
void Map::setNeedsRepaint() {
|
||||
data->setNeedsRepaint(true);
|
||||
}
|
||||
|
||||
void Map::setCollisionDebug(bool value) {
|
||||
data->setCollisionDebug(value);
|
||||
update(Update::Repaint);
|
||||
|
||||
@@ -256,8 +256,6 @@ void MapContext::update() {
|
||||
|
||||
if (!style) {
|
||||
updateFlags = Update::Nothing;
|
||||
} else if (data.getNeedsRepaint()) {
|
||||
updateFlags |= Update::Repaint;
|
||||
}
|
||||
|
||||
if (updateFlags == Update::Nothing || (data.mode == MapMode::Still && !callback)) {
|
||||
@@ -350,10 +348,8 @@ bool MapContext::renderSync(const TransformState& state, const FrameData& frame)
|
||||
view.afterRender();
|
||||
|
||||
if (style->hasTransitions() || painter->needsAnimation()) {
|
||||
data.setNeedsRepaint(true);
|
||||
updateFlags |= Update::Repaint;
|
||||
asyncUpdate->send();
|
||||
} else {
|
||||
data.setNeedsRepaint(false);
|
||||
}
|
||||
|
||||
return isLoaded();
|
||||
|
||||
@@ -101,14 +101,6 @@ public:
|
||||
defaultTransitionDelay = delay;
|
||||
}
|
||||
|
||||
inline bool getNeedsRepaint() const {
|
||||
return needsRepaint;
|
||||
}
|
||||
|
||||
inline void setNeedsRepaint(const bool needsRepaint_) {
|
||||
needsRepaint = needsRepaint_;
|
||||
}
|
||||
|
||||
util::exclusive<AnnotationManager> getAnnotationManager() {
|
||||
return util::exclusive<AnnotationManager>(
|
||||
&annotationManager,
|
||||
@@ -132,7 +124,6 @@ private:
|
||||
std::atomic<Duration> defaultFadeDuration;
|
||||
std::atomic<Duration> defaultTransitionDuration;
|
||||
std::atomic<Duration> defaultTransitionDelay;
|
||||
std::atomic<bool> needsRepaint;
|
||||
|
||||
// TODO: make private
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user