[core] Introduce StyleUpdateParameters

This commit is contained in:
John Firebaugh
2015-11-30 13:05:51 -08:00
committed by John Firebaugh
parent f27c28b6c4
commit 40ebf5d0d0
6 changed files with 91 additions and 44 deletions

View File

@@ -8,6 +8,7 @@
#include <mbgl/style/style_parser.hpp>
#include <mbgl/style/property_transition.hpp>
#include <mbgl/style/class_dictionary.hpp>
#include <mbgl/style/style_update_parameters.hpp>
#include <mbgl/style/style_cascade_parameters.hpp>
#include <mbgl/style/style_calculation_parameters.hpp>
#include <mbgl/geometry/glyph_atlas.hpp>
@@ -104,8 +105,18 @@ void Style::removeLayer(const std::string& id) {
void Style::update(const TransformState& transform,
TexturePool& texturePool) {
bool allTilesUpdated = true;
StyleUpdateParameters parameters(data.pixelRatio,
data.getDebug(),
data.getAnimationTime(),
transform,
workers,
texturePool,
shouldReparsePartialTiles,
data,
*this);
for (const auto& source : sources) {
if (!source->update(data, transform, *this, texturePool, shouldReparsePartialTiles)) {
if (!source->update(parameters)) {
allTilesUpdated = false;
}
}