[core] Convert style properties to a tuple-based approach
This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md. The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily. Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
This commit is contained in:
@@ -62,7 +62,7 @@ void CustomLayer::Impl::render(const TransformState& state) const {
|
||||
renderFn(context, parameters);
|
||||
}
|
||||
|
||||
bool CustomLayer::Impl::recalculate(const CalculationParameters&) {
|
||||
bool CustomLayer::Impl::evaluate(const PropertyEvaluationParameters&) {
|
||||
passes = RenderPass::Translucent;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user