[core] Introduce StyleCalculationParameters

This makes subsequent changes to the the parameter list less intrusive.
This commit is contained in:
John Firebaugh
2015-10-22 17:23:32 -07:00
parent 7a03d734fd
commit 0665b64590
21 changed files with 126 additions and 90 deletions

View File

@@ -2,10 +2,10 @@
namespace mbgl {
RenderPass BackgroundLayer::applyStyleProperties(const float z, const TimePoint& now, const ZoomHistory& zoomHistory) {
applyTransitionedStyleProperty(PropertyKey::BackgroundOpacity, properties.opacity, z, now, zoomHistory);
applyTransitionedStyleProperty(PropertyKey::BackgroundColor, properties.color, z, now, zoomHistory);
applyStyleProperty(PropertyKey::BackgroundImage, properties.image, z, now, zoomHistory);
RenderPass BackgroundLayer::applyStyleProperties(const StyleCalculationParameters& parameters) {
applyTransitionedStyleProperty(PropertyKey::BackgroundOpacity, properties.opacity, parameters);
applyTransitionedStyleProperty(PropertyKey::BackgroundColor, properties.color, parameters);
applyStyleProperty(PropertyKey::BackgroundImage, properties.image, parameters);
return properties.isVisible() ? RenderPass::Translucent : RenderPass::None;
}