From da4eb01bc7b74b09405f9911ef506c190b426f9d Mon Sep 17 00:00:00 2001 From: Andrew Hay Kurtz Date: Tue, 17 Sep 2019 17:35:08 -0700 Subject: [core] Enable 'line-sort-key' and 'fill-sort-key' layout properties (#15839) - Generate style code for 'line-sort-key' and 'symbol-sort-key' - Add new layout properties to FillLayer::Impl, FillBucket, and FillLayerFactory - Fix consistency of paint and layout properties type alias usage in FillBucket, LineBucket - Add optional feature sorting to fill and line Layout creation - Enable node render tests for fill-sort-key and line-sort-key - Fix FillBucket test construction - Prefer emplace_back to push_back for PatternFeature container - Fix buggy static_cast for PatternFeature indices - Maintain sort of features as they are created - Switch pattern layout features container to list from vector for better insert performance - Fix formatting expected by sanity check - Use subclass PatternLayoutSorted to work around lack of template functions - Fix to retain source order for features with equivalent sort keys during sorting - [core] Fix clang-format - [core] Address review comments - [core] Pass inserting strategy class at compile time - [core] Use sorted strategy only if sort key is defined in layout - [core] Update style generator - [core] Merge PatternLayout and PatternLayoutSorted classes - Use static methods for inserter strategies - Merge PatternLayout and PatternLayoutSorted classes --- include/mbgl/style/layers/fill_layer.hpp | 6 ++++++ include/mbgl/style/layers/line_layer.hpp | 4 ++++ 2 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp index d5249c2696..17dd66859c 100644 --- a/include/mbgl/style/layers/fill_layer.hpp +++ b/include/mbgl/style/layers/fill_layer.hpp @@ -25,6 +25,12 @@ public: StyleProperty getProperty(const std::string& name) const final; + // Layout properties + + static PropertyValue getDefaultFillSortKey(); + const PropertyValue& getFillSortKey() const; + void setFillSortKey(const PropertyValue&); + // Paint properties static PropertyValue getDefaultFillAntialias(); diff --git a/include/mbgl/style/layers/line_layer.hpp b/include/mbgl/style/layers/line_layer.hpp index 5b93d99cee..9f0882765f 100644 --- a/include/mbgl/style/layers/line_layer.hpp +++ b/include/mbgl/style/layers/line_layer.hpp @@ -46,6 +46,10 @@ public: const PropertyValue& getLineRoundLimit() const; void setLineRoundLimit(const PropertyValue&); + static PropertyValue getDefaultLineSortKey(); + const PropertyValue& getLineSortKey() const; + void setLineSortKey(const PropertyValue&); + // Paint properties static PropertyValue getDefaultLineBlur(); -- cgit v1.2.1