From 13aa2e58eec6297770370fdcb90731495c657ab8 Mon Sep 17 00:00:00 2001 From: Andrew Hay Kurtz Date: Tue, 17 Sep 2019 17:35:08 -0700 Subject: [PATCH 1/4] [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 + scripts/generate-style-code.js | 2 - src/mbgl/layermanager/fill_layer_factory.cpp | 10 +- src/mbgl/layermanager/line_layer_factory.cpp | 10 +- src/mbgl/layout/pattern_layout.hpp | 59 +++++++-- src/mbgl/renderer/buckets/fill_bucket.hpp | 3 +- src/mbgl/renderer/buckets/line_bucket.cpp | 4 +- src/mbgl/renderer/buckets/line_bucket.hpp | 1 - src/mbgl/style/layers/fill_layer.cpp | 37 +++++- src/mbgl/style/layers/fill_layer_impl.cpp | 3 +- src/mbgl/style/layers/fill_layer_impl.hpp | 2 +- .../style/layers/fill_layer_properties.hpp | 9 ++ src/mbgl/style/layers/layer.cpp.ejs | 3 +- src/mbgl/style/layers/line_layer.cpp | 40 ++++-- .../style/layers/line_layer_properties.hpp | 8 +- src/mbgl/style/layers/symbol_layer.cpp | 123 ++++++------------ test/gl/bucket.test.cpp | 4 +- 18 files changed, 204 insertions(+), 124 deletions(-) diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp index d5249c2696f..17dd66859cc 100644 --- a/include/mbgl/style/layers/fill_layer.hpp +++ b/include/mbgl/style/layers/fill_layer.hpp @@ -25,6 +25,12 @@ class FillLayer : public Layer { 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 5b93d99cee9..9f0882765f4 100644 --- a/include/mbgl/style/layers/line_layer.hpp +++ b/include/mbgl/style/layers/line_layer.hpp @@ -46,6 +46,10 @@ class LineLayer : public Layer { const PropertyValue& getLineRoundLimit() const; void setLineRoundLimit(const PropertyValue&); + static PropertyValue getDefaultLineSortKey(); + const PropertyValue& getLineSortKey() const; + void setLineSortKey(const PropertyValue&); + // Paint properties static PropertyValue getDefaultLineBlur(); diff --git a/scripts/generate-style-code.js b/scripts/generate-style-code.js index db2548680e4..804d4a243f8 100755 --- a/scripts/generate-style-code.js +++ b/scripts/generate-style-code.js @@ -8,8 +8,6 @@ const colorParser = require('csscolorparser'); // FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008 delete spec.layout_circle["circle-sort-key"] -delete spec.layout_line["line-sort-key"] -delete spec.layout_fill["fill-sort-key"] require('./style-code'); diff --git a/src/mbgl/layermanager/fill_layer_factory.cpp b/src/mbgl/layermanager/fill_layer_factory.cpp index 265fdc69f6c..0c7c270c987 100644 --- a/src/mbgl/layermanager/fill_layer_factory.cpp +++ b/src/mbgl/layermanager/fill_layer_factory.cpp @@ -29,8 +29,14 @@ FillLayerFactory::createLayout(const LayoutParameters& parameters, std::unique_ptr layer, const std::vector>& group) noexcept { using namespace style; - using LayoutType = PatternLayout; - return std::make_unique(parameters.bucketParameters, group, std::move(layer), parameters); + using LayoutTypeUnsorted = PatternLayout; + using LayoutTypeSorted = + PatternLayout; + auto layerProperties = staticImmutableCast(group.front()); + if (layerProperties->layerImpl().layout.get().isUndefined()) { + return std::make_unique(parameters.bucketParameters, group, std::move(layer), parameters); + } + return std::make_unique(parameters.bucketParameters, group, std::move(layer), parameters); } std::unique_ptr FillLayerFactory::createRenderLayer(Immutable impl) noexcept { diff --git a/src/mbgl/layermanager/line_layer_factory.cpp b/src/mbgl/layermanager/line_layer_factory.cpp index 5770b19f33c..53b91a07050 100644 --- a/src/mbgl/layermanager/line_layer_factory.cpp +++ b/src/mbgl/layermanager/line_layer_factory.cpp @@ -28,8 +28,14 @@ std::unique_ptr LineLayerFactory::createLayout(const LayoutParameters& p std::unique_ptr layer, const std::vector>& group) noexcept { using namespace style; - using LayoutType = PatternLayout; - return std::make_unique(parameters.bucketParameters, group, std::move(layer), parameters); + using LayoutTypeUnsorted = PatternLayout; + using LayoutTypeSorted = + PatternLayout; + auto layerProperties = staticImmutableCast(group.front()); + if (layerProperties->layerImpl().layout.get().isUndefined()) { + return std::make_unique(parameters.bucketParameters, group, std::move(layer), parameters); + } + return std::make_unique(parameters.bucketParameters, group, std::move(layer), parameters); } std::unique_ptr LineLayerFactory::createRenderLayer(Immutable impl) noexcept { diff --git a/src/mbgl/layout/pattern_layout.hpp b/src/mbgl/layout/pattern_layout.hpp index 48531e836ba..44729dea835 100644 --- a/src/mbgl/layout/pattern_layout.hpp +++ b/src/mbgl/layout/pattern_layout.hpp @@ -1,4 +1,5 @@ #pragma once +#include #include #include #include @@ -19,15 +20,58 @@ using PatternLayerMap = std::map; class PatternFeature { public: - const uint32_t i; + PatternFeature(std::size_t i_, + std::unique_ptr feature_, + PatternLayerMap patterns_, + float sortKey_ = 0.0f) + : i(i_), feature(std::move(feature_)), patterns(std::move(patterns_)), sortKey(sortKey_) {} + + friend bool operator<(const PatternFeature& lhs, const PatternFeature& rhs) { return lhs.sortKey < rhs.sortKey; } + + std::size_t i; std::unique_ptr feature; PatternLayerMap patterns; + float sortKey; +}; + +template +struct PatternFeatureInserter; + +template <> +struct PatternFeatureInserter { + template + static void insert(std::vector& features, + std::size_t index, + std::unique_ptr feature, + PatternLayerMap patternDependencyMap, + float /*zoom*/, + const PropertiesType&) { + features.emplace_back(index, std::move(feature), std::move(patternDependencyMap)); + } +}; + +template +struct PatternFeatureInserter { + template + static void insert(std::vector& features, + std::size_t index, + std::unique_ptr feature, + PatternLayerMap patternDependencyMap, + float zoom, + const PropertiesType& properties) { + const auto& sortKeyProperty = properties.template get(); + float sortKey = sortKeyProperty.evaluate(*feature, zoom, SortKeyPropertyType::defaultValue()); + PatternFeature patternFeature{index, std::move(feature), std::move(patternDependencyMap), sortKey}; + const auto lowerBound = std::lower_bound(features.cbegin(), features.cend(), patternFeature); + features.insert(lowerBound, std::move(patternFeature)); + } }; template ::PossiblyEvaluated> + class LayoutPropertiesType = typename style::Properties<>, + class SortKeyPropertyType = void> class PatternLayout : public Layout { public: PatternLayout(const BucketParameters& parameters, @@ -98,12 +142,12 @@ class PatternLayout : public Layout { } } } - features.push_back({static_cast(i), std::move(feature), patternDependencyMap}); + + PatternFeatureInserter::insert( + features, i, std::move(feature), std::move(patternDependencyMap), zoom, layout); } }; - ~PatternLayout() final = default; - bool hasDependencies() const override { return hasPattern; } @@ -126,13 +170,13 @@ class PatternLayout : public Layout { } }; -private: +protected: std::map> layerPropertiesMap; std::string bucketLeaderID; const std::unique_ptr sourceLayer; std::vector features; - PossiblyEvaluatedLayoutPropertiesType layout; + typename LayoutPropertiesType::PossiblyEvaluated layout; const float zoom; const uint32_t overscaling; @@ -141,4 +185,3 @@ class PatternLayout : public Layout { }; } // namespace mbgl - diff --git a/src/mbgl/renderer/buckets/fill_bucket.hpp b/src/mbgl/renderer/buckets/fill_bucket.hpp index 9f65e774cab..7a3f6811215 100644 --- a/src/mbgl/renderer/buckets/fill_bucket.hpp +++ b/src/mbgl/renderer/buckets/fill_bucket.hpp @@ -18,8 +18,7 @@ class RenderFillLayer; class FillBucket final : public Bucket { public: ~FillBucket() override; - using PossiblyEvaluatedPaintProperties = style::FillPaintProperties::PossiblyEvaluated; - using PossiblyEvaluatedLayoutProperties = style::Properties<>::PossiblyEvaluated; + using PossiblyEvaluatedLayoutProperties = style::FillLayoutProperties::PossiblyEvaluated; FillBucket(const PossiblyEvaluatedLayoutProperties layout, const std::map>& layerPaintProperties, diff --git a/src/mbgl/renderer/buckets/line_bucket.cpp b/src/mbgl/renderer/buckets/line_bucket.cpp index e7567228541..895d5aa1bb5 100644 --- a/src/mbgl/renderer/buckets/line_bucket.cpp +++ b/src/mbgl/renderer/buckets/line_bucket.cpp @@ -10,8 +10,8 @@ namespace mbgl { using namespace style; -LineBucket::LineBucket(const style::LineLayoutProperties::PossiblyEvaluated layout_, - const std::map>& layerPaintProperties, +LineBucket::LineBucket(const LineBucket::PossiblyEvaluatedLayoutProperties layout_, + const std::map>& layerPaintProperties, const float zoom_, const uint32_t overscaling_) : layout(layout_), zoom(zoom_), overscaling(overscaling_) { diff --git a/src/mbgl/renderer/buckets/line_bucket.hpp b/src/mbgl/renderer/buckets/line_bucket.hpp index 6343aab2bee..a3237c9df9d 100644 --- a/src/mbgl/renderer/buckets/line_bucket.hpp +++ b/src/mbgl/renderer/buckets/line_bucket.hpp @@ -17,7 +17,6 @@ class RenderLineLayer; class LineBucket final : public Bucket { public: - using PossiblyEvaluatedPaintProperties = style::LinePaintProperties::PossiblyEvaluated; using PossiblyEvaluatedLayoutProperties = style::LineLayoutProperties::PossiblyEvaluated; LineBucket(const PossiblyEvaluatedLayoutProperties layout, diff --git a/src/mbgl/style/layers/fill_layer.cpp b/src/mbgl/style/layers/fill_layer.cpp index 9a430378716..757738dfefd 100644 --- a/src/mbgl/style/layers/fill_layer.cpp +++ b/src/mbgl/style/layers/fill_layer.cpp @@ -55,11 +55,27 @@ std::unique_ptr FillLayer::cloneRef(const std::string& id_) const { return std::make_unique(std::move(impl_)); } -void FillLayer::Impl::stringifyLayout(rapidjson::Writer&) const { +void FillLayer::Impl::stringifyLayout(rapidjson::Writer& writer) const { + layout.stringify(writer); } // Layout properties +PropertyValue FillLayer::getDefaultFillSortKey() { + return FillSortKey::defaultValue(); +} + +const PropertyValue& FillLayer::getFillSortKey() const { + return impl().layout.get(); +} + +void FillLayer::setFillSortKey(const PropertyValue& value) { + if (value == getFillSortKey()) return; + auto impl_ = mutableImpl(); + impl_->layout.get() = value; + baseImpl = std::move(impl_); + observer->onLayerChanged(*this); +} // Paint properties @@ -271,6 +287,7 @@ enum class Property : uint8_t { FillPatternTransition, FillTranslateTransition, FillTranslateAnchorTransition, + FillSortKey, }; template @@ -292,7 +309,8 @@ MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map< {"fill-outline-color-transition", toUint8(Property::FillOutlineColorTransition)}, {"fill-pattern-transition", toUint8(Property::FillPatternTransition)}, {"fill-translate-transition", toUint8(Property::FillTranslateTransition)}, - {"fill-translate-anchor-transition", toUint8(Property::FillTranslateAnchorTransition)}}); + {"fill-translate-anchor-transition", toUint8(Property::FillTranslateAnchorTransition)}, + {"fill-sort-key", toUint8(Property::FillSortKey)}}); } // namespace optional FillLayer::setProperty(const std::string& name, const Convertible& value) { @@ -331,15 +349,22 @@ optional FillLayer::setProperty(const std::string& name, const Convertibl return nullopt; } } - if (property == Property::FillOpacity) { + if (property == Property::FillOpacity || property == Property::FillSortKey) { Error error; const auto& typedValue = convert>(value, error, true, false); if (!typedValue) { return error; } - setFillOpacity(*typedValue); - return nullopt; + if (property == Property::FillOpacity) { + setFillOpacity(*typedValue); + return nullopt; + } + + if (property == Property::FillSortKey) { + setFillSortKey(*typedValue); + return nullopt; + } } if (property == Property::FillPattern) { Error error; @@ -451,6 +476,8 @@ StyleProperty FillLayer::getProperty(const std::string& name) const { return makeStyleProperty(getFillTranslateTransition()); case Property::FillTranslateAnchorTransition: return makeStyleProperty(getFillTranslateAnchorTransition()); + case Property::FillSortKey: + return makeStyleProperty(getFillSortKey()); } return {}; } diff --git a/src/mbgl/style/layers/fill_layer_impl.cpp b/src/mbgl/style/layers/fill_layer_impl.cpp index 45e350e00ec..ad994a06b60 100644 --- a/src/mbgl/style/layers/fill_layer_impl.cpp +++ b/src/mbgl/style/layers/fill_layer_impl.cpp @@ -6,8 +6,7 @@ namespace style { bool FillLayer::Impl::hasLayoutDifference(const Layer::Impl& other) const { assert(other.getTypeInfo() == getTypeInfo()); const auto& impl = static_cast(other); - return filter != impl.filter || - visibility != impl.visibility || + return filter != impl.filter || visibility != impl.visibility || layout != impl.layout || paint.get().value != impl.paint.get().value || paint.hasDataDrivenPropertyDifference(impl.paint); } diff --git a/src/mbgl/style/layers/fill_layer_impl.hpp b/src/mbgl/style/layers/fill_layer_impl.hpp index 92f3c97284a..2a4fa44eb1f 100644 --- a/src/mbgl/style/layers/fill_layer_impl.hpp +++ b/src/mbgl/style/layers/fill_layer_impl.hpp @@ -14,7 +14,7 @@ class FillLayer::Impl : public Layer::Impl { bool hasLayoutDifference(const Layer::Impl&) const override; void stringifyLayout(rapidjson::Writer&) const override; - Properties<>::Unevaluated layout; + FillLayoutProperties::Unevaluated layout; FillPaintProperties::Transitionable paint; DECLARE_LAYER_TYPE_INFO; diff --git a/src/mbgl/style/layers/fill_layer_properties.hpp b/src/mbgl/style/layers/fill_layer_properties.hpp index ad8ed848929..7867fe8f0c3 100644 --- a/src/mbgl/style/layers/fill_layer_properties.hpp +++ b/src/mbgl/style/layers/fill_layer_properties.hpp @@ -16,6 +16,11 @@ namespace mbgl { namespace style { +struct FillSortKey : DataDrivenLayoutProperty { + static constexpr const char *name() { return "fill-sort-key"; } + static float defaultValue() { return 0; } +}; + struct FillAntialias : PaintProperty { static bool defaultValue() { return true; } }; @@ -44,6 +49,10 @@ struct FillTranslateAnchor : PaintProperty { static TranslateAnchorType defaultValue() { return TranslateAnchorType::Map; } }; +class FillLayoutProperties : public Properties< + FillSortKey +> {}; + class FillPaintProperties : public Properties< FillAntialias, FillColor, diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs index bcec4098d58..e74e7ab345e 100644 --- a/src/mbgl/style/layers/layer.cpp.ejs +++ b/src/mbgl/style/layers/layer.cpp.ejs @@ -149,8 +149,7 @@ const <%- propertyValueType(property) %>& <%- camelize(type) %>Layer::get<%- cam } void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(const <%- propertyValueType(property) %>& value) { - if (value == get<%- camelize(property.name) %>()) - return; + if (value == get<%- camelize(property.name) %>()) return; auto impl_ = mutableImpl(); impl_->layout.get<<%- camelize(property.name) %>>() = value; baseImpl = std::move(impl_); diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp index 0f3e49963c4..caa7f44e0c6 100644 --- a/src/mbgl/style/layers/line_layer.cpp +++ b/src/mbgl/style/layers/line_layer.cpp @@ -70,8 +70,7 @@ const PropertyValue& LineLayer::getLineCap() const { } void LineLayer::setLineCap(const PropertyValue& value) { - if (value == getLineCap()) - return; + if (value == getLineCap()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -86,8 +85,7 @@ const PropertyValue& LineLayer::getLineJoin() const { } void LineLayer::setLineJoin(const PropertyValue& value) { - if (value == getLineJoin()) - return; + if (value == getLineJoin()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -102,8 +100,7 @@ const PropertyValue& LineLayer::getLineMiterLimit() const { } void LineLayer::setLineMiterLimit(const PropertyValue& value) { - if (value == getLineMiterLimit()) - return; + if (value == getLineMiterLimit()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -118,13 +115,27 @@ const PropertyValue& LineLayer::getLineRoundLimit() const { } void LineLayer::setLineRoundLimit(const PropertyValue& value) { - if (value == getLineRoundLimit()) - return; + if (value == getLineRoundLimit()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); observer->onLayerChanged(*this); } +PropertyValue LineLayer::getDefaultLineSortKey() { + return LineSortKey::defaultValue(); +} + +const PropertyValue& LineLayer::getLineSortKey() const { + return impl().layout.get(); +} + +void LineLayer::setLineSortKey(const PropertyValue& value) { + if (value == getLineSortKey()) return; + auto impl_ = mutableImpl(); + impl_->layout.get() = value; + baseImpl = std::move(impl_); + observer->onLayerChanged(*this); +} // Paint properties @@ -457,6 +468,7 @@ enum class Property : uint8_t { LineJoin, LineMiterLimit, LineRoundLimit, + LineSortKey, }; template @@ -490,7 +502,8 @@ MAPBOX_ETERNAL_CONSTEXPR const auto layerProperties = mapbox::eternal::hash_map< {"line-cap", toUint8(Property::LineCap)}, {"line-join", toUint8(Property::LineJoin)}, {"line-miter-limit", toUint8(Property::LineMiterLimit)}, - {"line-round-limit", toUint8(Property::LineRoundLimit)}}); + {"line-round-limit", toUint8(Property::LineRoundLimit)}, + {"line-sort-key", toUint8(Property::LineSortKey)}}); } // namespace optional LineLayer::setProperty(const std::string& name, const Convertible& value) { @@ -503,7 +516,7 @@ optional LineLayer::setProperty(const std::string& name, const Convertibl auto property = static_cast(it->second); if (property == Property::LineBlur || property == Property::LineGapWidth || property == Property::LineOffset || - property == Property::LineOpacity || property == Property::LineWidth) { + property == Property::LineOpacity || property == Property::LineWidth || property == Property::LineSortKey) { Error error; const auto& typedValue = convert>(value, error, true, false); if (!typedValue) { @@ -534,6 +547,11 @@ optional LineLayer::setProperty(const std::string& name, const Convertibl setLineWidth(*typedValue); return nullopt; } + + if (property == Property::LineSortKey) { + setLineSortKey(*typedValue); + return nullopt; + } } if (property == Property::LineColor) { Error error; @@ -756,6 +774,8 @@ StyleProperty LineLayer::getProperty(const std::string& name) const { return makeStyleProperty(getLineMiterLimit()); case Property::LineRoundLimit: return makeStyleProperty(getLineRoundLimit()); + case Property::LineSortKey: + return makeStyleProperty(getLineSortKey()); } return {}; } diff --git a/src/mbgl/style/layers/line_layer_properties.hpp b/src/mbgl/style/layers/line_layer_properties.hpp index 29ba9ec6413..b2bd4aa401e 100644 --- a/src/mbgl/style/layers/line_layer_properties.hpp +++ b/src/mbgl/style/layers/line_layer_properties.hpp @@ -36,6 +36,11 @@ struct LineRoundLimit : LayoutProperty { static float defaultValue() { return 1; } }; +struct LineSortKey : DataDrivenLayoutProperty { + static constexpr const char *name() { return "line-sort-key"; } + static float defaultValue() { return 0; } +}; + struct LineBlur : DataDrivenPaintProperty { static float defaultValue() { return 0; } }; @@ -88,7 +93,8 @@ class LineLayoutProperties : public Properties< LineCap, LineJoin, LineMiterLimit, - LineRoundLimit + LineRoundLimit, + LineSortKey > {}; class LinePaintProperties : public Properties< diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp index fe9658b25ac..39c2f2a052e 100644 --- a/src/mbgl/style/layers/symbol_layer.cpp +++ b/src/mbgl/style/layers/symbol_layer.cpp @@ -70,8 +70,7 @@ const PropertyValue& SymbolLayer::getIconAllowOverlap() const { } void SymbolLayer::setIconAllowOverlap(const PropertyValue& value) { - if (value == getIconAllowOverlap()) - return; + if (value == getIconAllowOverlap()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -86,8 +85,7 @@ const PropertyValue& SymbolLayer::getIconAnchor() const { } void SymbolLayer::setIconAnchor(const PropertyValue& value) { - if (value == getIconAnchor()) - return; + if (value == getIconAnchor()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -102,8 +100,7 @@ const PropertyValue& SymbolLayer::getIconIgnorePlacement() const { } void SymbolLayer::setIconIgnorePlacement(const PropertyValue& value) { - if (value == getIconIgnorePlacement()) - return; + if (value == getIconIgnorePlacement()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -118,8 +115,7 @@ const PropertyValue& SymbolLayer::getIconImage() const { } void SymbolLayer::setIconImage(const PropertyValue& value) { - if (value == getIconImage()) - return; + if (value == getIconImage()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -134,8 +130,7 @@ const PropertyValue& SymbolLayer::getIconKeepUpright() const { } void SymbolLayer::setIconKeepUpright(const PropertyValue& value) { - if (value == getIconKeepUpright()) - return; + if (value == getIconKeepUpright()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -150,8 +145,7 @@ const PropertyValue>& SymbolLayer::getIconOffset() const { } void SymbolLayer::setIconOffset(const PropertyValue>& value) { - if (value == getIconOffset()) - return; + if (value == getIconOffset()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -166,8 +160,7 @@ const PropertyValue& SymbolLayer::getIconOptional() const { } void SymbolLayer::setIconOptional(const PropertyValue& value) { - if (value == getIconOptional()) - return; + if (value == getIconOptional()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -182,8 +175,7 @@ const PropertyValue& SymbolLayer::getIconPadding() const { } void SymbolLayer::setIconPadding(const PropertyValue& value) { - if (value == getIconPadding()) - return; + if (value == getIconPadding()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -198,8 +190,7 @@ const PropertyValue& SymbolLayer::getIconPitchAlignment() const { } void SymbolLayer::setIconPitchAlignment(const PropertyValue& value) { - if (value == getIconPitchAlignment()) - return; + if (value == getIconPitchAlignment()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -214,8 +205,7 @@ const PropertyValue& SymbolLayer::getIconRotate() const { } void SymbolLayer::setIconRotate(const PropertyValue& value) { - if (value == getIconRotate()) - return; + if (value == getIconRotate()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -230,8 +220,7 @@ const PropertyValue& SymbolLayer::getIconRotationAlignment() cons } void SymbolLayer::setIconRotationAlignment(const PropertyValue& value) { - if (value == getIconRotationAlignment()) - return; + if (value == getIconRotationAlignment()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -246,8 +235,7 @@ const PropertyValue& SymbolLayer::getIconSize() const { } void SymbolLayer::setIconSize(const PropertyValue& value) { - if (value == getIconSize()) - return; + if (value == getIconSize()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -262,8 +250,7 @@ const PropertyValue& SymbolLayer::getIconTextFit() const { } void SymbolLayer::setIconTextFit(const PropertyValue& value) { - if (value == getIconTextFit()) - return; + if (value == getIconTextFit()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -278,8 +265,7 @@ const PropertyValue>& SymbolLayer::getIconTextFitPadding() } void SymbolLayer::setIconTextFitPadding(const PropertyValue>& value) { - if (value == getIconTextFitPadding()) - return; + if (value == getIconTextFitPadding()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -294,8 +280,7 @@ const PropertyValue& SymbolLayer::getSymbolAvoidEdges() const { } void SymbolLayer::setSymbolAvoidEdges(const PropertyValue& value) { - if (value == getSymbolAvoidEdges()) - return; + if (value == getSymbolAvoidEdges()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -310,8 +295,7 @@ const PropertyValue& SymbolLayer::getSymbolPlacement() cons } void SymbolLayer::setSymbolPlacement(const PropertyValue& value) { - if (value == getSymbolPlacement()) - return; + if (value == getSymbolPlacement()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -326,8 +310,7 @@ const PropertyValue& SymbolLayer::getSymbolSortKey() const { } void SymbolLayer::setSymbolSortKey(const PropertyValue& value) { - if (value == getSymbolSortKey()) - return; + if (value == getSymbolSortKey()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -342,8 +325,7 @@ const PropertyValue& SymbolLayer::getSymbolSpacing() const { } void SymbolLayer::setSymbolSpacing(const PropertyValue& value) { - if (value == getSymbolSpacing()) - return; + if (value == getSymbolSpacing()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -358,8 +340,7 @@ const PropertyValue& SymbolLayer::getSymbolZOrder() const { } void SymbolLayer::setSymbolZOrder(const PropertyValue& value) { - if (value == getSymbolZOrder()) - return; + if (value == getSymbolZOrder()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -374,8 +355,7 @@ const PropertyValue& SymbolLayer::getTextAllowOverlap() const { } void SymbolLayer::setTextAllowOverlap(const PropertyValue& value) { - if (value == getTextAllowOverlap()) - return; + if (value == getTextAllowOverlap()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -390,8 +370,7 @@ const PropertyValue& SymbolLayer::getTextAnchor() const { } void SymbolLayer::setTextAnchor(const PropertyValue& value) { - if (value == getTextAnchor()) - return; + if (value == getTextAnchor()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -406,8 +385,7 @@ const PropertyValue& SymbolLayer::getTextField() const { } void SymbolLayer::setTextField(const PropertyValue& value) { - if (value == getTextField()) - return; + if (value == getTextField()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -422,8 +400,7 @@ const PropertyValue>& SymbolLayer::getTextFont() const } void SymbolLayer::setTextFont(const PropertyValue>& value) { - if (value == getTextFont()) - return; + if (value == getTextFont()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -438,8 +415,7 @@ const PropertyValue& SymbolLayer::getTextIgnorePlacement() const { } void SymbolLayer::setTextIgnorePlacement(const PropertyValue& value) { - if (value == getTextIgnorePlacement()) - return; + if (value == getTextIgnorePlacement()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -454,8 +430,7 @@ const PropertyValue& SymbolLayer::getTextJustify() const { } void SymbolLayer::setTextJustify(const PropertyValue& value) { - if (value == getTextJustify()) - return; + if (value == getTextJustify()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -470,8 +445,7 @@ const PropertyValue& SymbolLayer::getTextKeepUpright() const { } void SymbolLayer::setTextKeepUpright(const PropertyValue& value) { - if (value == getTextKeepUpright()) - return; + if (value == getTextKeepUpright()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -486,8 +460,7 @@ const PropertyValue& SymbolLayer::getTextLetterSpacing() const { } void SymbolLayer::setTextLetterSpacing(const PropertyValue& value) { - if (value == getTextLetterSpacing()) - return; + if (value == getTextLetterSpacing()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -502,8 +475,7 @@ const PropertyValue& SymbolLayer::getTextLineHeight() const { } void SymbolLayer::setTextLineHeight(const PropertyValue& value) { - if (value == getTextLineHeight()) - return; + if (value == getTextLineHeight()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -518,8 +490,7 @@ const PropertyValue& SymbolLayer::getTextMaxAngle() const { } void SymbolLayer::setTextMaxAngle(const PropertyValue& value) { - if (value == getTextMaxAngle()) - return; + if (value == getTextMaxAngle()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -534,8 +505,7 @@ const PropertyValue& SymbolLayer::getTextMaxWidth() const { } void SymbolLayer::setTextMaxWidth(const PropertyValue& value) { - if (value == getTextMaxWidth()) - return; + if (value == getTextMaxWidth()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -550,8 +520,7 @@ const PropertyValue>& SymbolLayer::getTextOffset() const { } void SymbolLayer::setTextOffset(const PropertyValue>& value) { - if (value == getTextOffset()) - return; + if (value == getTextOffset()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -566,8 +535,7 @@ const PropertyValue& SymbolLayer::getTextOptional() const { } void SymbolLayer::setTextOptional(const PropertyValue& value) { - if (value == getTextOptional()) - return; + if (value == getTextOptional()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -582,8 +550,7 @@ const PropertyValue& SymbolLayer::getTextPadding() const { } void SymbolLayer::setTextPadding(const PropertyValue& value) { - if (value == getTextPadding()) - return; + if (value == getTextPadding()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -598,8 +565,7 @@ const PropertyValue& SymbolLayer::getTextPitchAlignment() const { } void SymbolLayer::setTextPitchAlignment(const PropertyValue& value) { - if (value == getTextPitchAlignment()) - return; + if (value == getTextPitchAlignment()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -614,8 +580,7 @@ const PropertyValue& SymbolLayer::getTextRadialOffset() const { } void SymbolLayer::setTextRadialOffset(const PropertyValue& value) { - if (value == getTextRadialOffset()) - return; + if (value == getTextRadialOffset()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -630,8 +595,7 @@ const PropertyValue& SymbolLayer::getTextRotate() const { } void SymbolLayer::setTextRotate(const PropertyValue& value) { - if (value == getTextRotate()) - return; + if (value == getTextRotate()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -646,8 +610,7 @@ const PropertyValue& SymbolLayer::getTextRotationAlignment() cons } void SymbolLayer::setTextRotationAlignment(const PropertyValue& value) { - if (value == getTextRotationAlignment()) - return; + if (value == getTextRotationAlignment()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -662,8 +625,7 @@ const PropertyValue& SymbolLayer::getTextSize() const { } void SymbolLayer::setTextSize(const PropertyValue& value) { - if (value == getTextSize()) - return; + if (value == getTextSize()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -678,8 +640,7 @@ const PropertyValue& SymbolLayer::getTextTransform() const { } void SymbolLayer::setTextTransform(const PropertyValue& value) { - if (value == getTextTransform()) - return; + if (value == getTextTransform()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -694,8 +655,7 @@ const PropertyValue>& SymbolLayer::getTextVa } void SymbolLayer::setTextVariableAnchor(const PropertyValue>& value) { - if (value == getTextVariableAnchor()) - return; + if (value == getTextVariableAnchor()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); @@ -710,8 +670,7 @@ const PropertyValue>& SymbolLayer::getTextWriti } void SymbolLayer::setTextWritingMode(const PropertyValue>& value) { - if (value == getTextWritingMode()) - return; + if (value == getTextWritingMode()) return; auto impl_ = mutableImpl(); impl_->layout.get() = value; baseImpl = std::move(impl_); diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp index 9f8af4e469b..2a7455e17c7 100644 --- a/test/gl/bucket.test.cpp +++ b/test/gl/bucket.test.cpp @@ -67,7 +67,7 @@ TEST(Buckets, CircleBucket) { TEST(Buckets, FillBucket) { gl::HeadlessBackend backend({ 512, 256 }); gfx::BackendScope scope { backend }; - style::Properties<>::PossiblyEvaluated layout; + FillBucket::PossiblyEvaluatedLayoutProperties layout; gl::Context context{ backend }; FillBucket bucket { layout, {}, 5.0f, 1}; @@ -89,7 +89,7 @@ TEST(Buckets, FillBucket) { TEST(Buckets, LineBucket) { gl::HeadlessBackend backend({ 512, 256 }); gfx::BackendScope scope { backend }; - style::LineLayoutProperties::PossiblyEvaluated layout; + LineBucket::PossiblyEvaluatedLayoutProperties layout; gl::Context context{ backend }; LineBucket bucket { layout, {}, 10.0f, 1 }; From b36c03af0b627018bc92547cad20787da1e8f67c Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Tue, 17 Dec 2019 10:32:24 +0200 Subject: [PATCH 2/4] [core] Unskip render tests --- metrics/ignores/platform-all.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/metrics/ignores/platform-all.json b/metrics/ignores/platform-all.json index c89b14ef955..c9e7a84be34 100644 --- a/metrics/ignores/platform-all.json +++ b/metrics/ignores/platform-all.json @@ -81,7 +81,6 @@ "render-tests/fill-extrusion-pattern/opacity": "https://github.com/mapbox/mapbox-gl-js/issues/3327", "render-tests/fill-extrusion-pattern/tile-buffer": "https://github.com/mapbox/mapbox-gl-js/issues/3327", "render-tests/fill-pattern/update-feature-state": "https://github.com/mapbox/mapbox-gl-native/issues/15895", - "render-tests/fill-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008", "render-tests/geojson/inline-linestring-fill": "current behavior is arbitrary", "render-tests/icon-text-fit/stretch-fifteen-part": "https://github.com/mapbox/mapbox-gl-native/issues/16017", "render-tests/icon-text-fit/stretch-nine-part": "https://github.com/mapbox/mapbox-gl-native/issues/16017", @@ -94,7 +93,6 @@ "render-tests/icon-text-fit/stretch-two-part": "https://github.com/mapbox/mapbox-gl-native/issues/16017", "render-tests/icon-text-fit/stretch-underscale": "https://github.com/mapbox/mapbox-gl-native/issues/16017", "render-tests/icon-text-fit/text-variable-anchor-overlap": "https://github.com/mapbox/mapbox-gl-native/issues/15809", - "render-tests/line-sort-key/literal": "https://github.com/mapbox/mapbox-gl-native/issues/15008", "render-tests/mixed-zoom/z10-z11": "https://github.com/mapbox/mapbox-gl-native/issues/10397", "render-tests/raster-masking/overlapping-zoom": "https://github.com/mapbox/mapbox-gl-native/issues/10195", "render-tests/real-world/bangkok": "https://github.com/mapbox/mapbox-gl-native/issues/10412", From b2d080ad2969e5517a0f5d7e03530b742aad351f Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Tue, 10 Dec 2019 18:57:33 +0200 Subject: [PATCH 3/4] [metrics] Add new baselines --- .../fill-sort-key/literal/metrics.json | 35 +++++++++++++++++++ .../line-sort-key/literal/metrics.json | 35 +++++++++++++++++++ .../android-arm64-v8a/metrics.json | 4 +-- .../android-armeabi-v7a/metrics.json | 4 +-- .../next-binary-size/android-x86/metrics.json | 4 +-- .../android-x86_64/metrics.json | 4 +-- .../linux-clang8/metrics.json | 8 ++--- .../next-binary-size/linux-gcc8/metrics.json | 8 ++--- .../fill-sort-key/literal/metrics.json | 35 +++++++++++++++++++ .../line-sort-key/literal/metrics.json | 35 +++++++++++++++++++ .../fill-sort-key/literal/metrics.json | 35 +++++++++++++++++++ .../line-sort-key/literal/metrics.json | 35 +++++++++++++++++++ .../fill-sort-key/literal/metrics.json | 35 +++++++++++++++++++ .../line-sort-key/literal/metrics.json | 35 +++++++++++++++++++ 14 files changed, 296 insertions(+), 16 deletions(-) create mode 100644 metrics/next-android-render-test-runner/render-tests/fill-sort-key/literal/metrics.json create mode 100644 metrics/next-android-render-test-runner/render-tests/line-sort-key/literal/metrics.json create mode 100644 metrics/next-linux-clang8-release/render-tests/fill-sort-key/literal/metrics.json create mode 100644 metrics/next-linux-clang8-release/render-tests/line-sort-key/literal/metrics.json create mode 100644 metrics/next-linux-gcc8-release/render-tests/fill-sort-key/literal/metrics.json create mode 100644 metrics/next-linux-gcc8-release/render-tests/line-sort-key/literal/metrics.json create mode 100644 metrics/next-macos-xcode11-release/render-tests/fill-sort-key/literal/metrics.json create mode 100644 metrics/next-macos-xcode11-release/render-tests/line-sort-key/literal/metrics.json diff --git a/metrics/next-android-render-test-runner/render-tests/fill-sort-key/literal/metrics.json b/metrics/next-android-render-test-runner/render-tests/fill-sort-key/literal/metrics.json new file mode 100644 index 00000000000..a3bacd4632a --- /dev/null +++ b/metrics/next-android-render-test-runner/render-tests/fill-sort-key/literal/metrics.json @@ -0,0 +1,35 @@ +{ + "network": [ + [ + "probeNetwork - default - end", + 0, + 0 + ], + [ + "probeNetwork - default - start", + 0, + 0 + ] + ], + "gfx": [ + [ + "probeGFX - default - end", + 8, + 9, + 25, + 1, + [ + 131072, + 131072 + ], + [ + 406, + 406 + ], + [ + 1264, + 1264 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/next-android-render-test-runner/render-tests/line-sort-key/literal/metrics.json b/metrics/next-android-render-test-runner/render-tests/line-sort-key/literal/metrics.json new file mode 100644 index 00000000000..12a75988519 --- /dev/null +++ b/metrics/next-android-render-test-runner/render-tests/line-sort-key/literal/metrics.json @@ -0,0 +1,35 @@ +{ + "network": [ + [ + "probeNetwork - default - end", + 0, + 0 + ], + [ + "probeNetwork - default - start", + 0, + 0 + ] + ], + "gfx": [ + [ + "probeGFX - default - end", + 8, + 9, + 17, + 1, + [ + 131072, + 131072 + ], + [ + 166, + 166 + ], + [ + 832, + 832 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/next-binary-size/android-arm64-v8a/metrics.json b/metrics/next-binary-size/android-arm64-v8a/metrics.json index 5529b66e35c..8daa544846f 100644 --- a/metrics/next-binary-size/android-arm64-v8a/metrics.json +++ b/metrics/next-binary-size/android-arm64-v8a/metrics.json @@ -3,7 +3,7 @@ [ "android-arm64-v8a", "/tmp/attach/install/next-android-arm64-v8a-release/lib/libmapbox-gl.so", - 1907875 + 1930061 ] ] -} +} \ No newline at end of file diff --git a/metrics/next-binary-size/android-armeabi-v7a/metrics.json b/metrics/next-binary-size/android-armeabi-v7a/metrics.json index e8b686180a1..6874e34734a 100644 --- a/metrics/next-binary-size/android-armeabi-v7a/metrics.json +++ b/metrics/next-binary-size/android-armeabi-v7a/metrics.json @@ -3,7 +3,7 @@ [ "android-armeabi-v7a", "/tmp/attach/install/next-android-armeabi-v7a-release/lib/libmapbox-gl.so", - 1607847 + 1624848 ] ] -} +} \ No newline at end of file diff --git a/metrics/next-binary-size/android-x86/metrics.json b/metrics/next-binary-size/android-x86/metrics.json index f19481ea33c..30de0f64a54 100644 --- a/metrics/next-binary-size/android-x86/metrics.json +++ b/metrics/next-binary-size/android-x86/metrics.json @@ -3,7 +3,7 @@ [ "android-x86", "/tmp/attach/install/next-android-x86-release/lib/libmapbox-gl.so", - 1934186 + 1953751 ] ] -} +} \ No newline at end of file diff --git a/metrics/next-binary-size/android-x86_64/metrics.json b/metrics/next-binary-size/android-x86_64/metrics.json index 5bfe5ecb67b..d16b5af7514 100644 --- a/metrics/next-binary-size/android-x86_64/metrics.json +++ b/metrics/next-binary-size/android-x86_64/metrics.json @@ -3,7 +3,7 @@ [ "android-x86_64", "/tmp/attach/install/next-android-x86_64-release/lib/libmapbox-gl.so", - 1946541 + 1966850 ] ] -} +} \ No newline at end of file diff --git a/metrics/next-binary-size/linux-clang8/metrics.json b/metrics/next-binary-size/linux-clang8/metrics.json index 9ffd3db0160..ef40eb2ea79 100644 --- a/metrics/next-binary-size/linux-clang8/metrics.json +++ b/metrics/next-binary-size/linux-clang8/metrics.json @@ -3,17 +3,17 @@ [ "mbgl-glfw", "/tmp/attach/install/next-linux-clang8-release/bin/mbgl-glfw", - 6290568 + 6380744 ], [ "mbgl-offline", "/tmp/attach/install/next-linux-clang8-release/bin/mbgl-offline", - 5597912 + 5651144 ], [ "mbgl-render", "/tmp/attach/install/next-linux-clang8-release/bin/mbgl-render", - 6220728 + 6282152 ] ] -} +} \ No newline at end of file diff --git a/metrics/next-binary-size/linux-gcc8/metrics.json b/metrics/next-binary-size/linux-gcc8/metrics.json index f568a9cc3d0..e7c8cb0d08e 100644 --- a/metrics/next-binary-size/linux-gcc8/metrics.json +++ b/metrics/next-binary-size/linux-gcc8/metrics.json @@ -3,17 +3,17 @@ [ "mbgl-glfw", "/tmp/attach/install/next-linux-gcc8-release/bin/mbgl-glfw", - 7323976 + 7369032 ], [ "mbgl-offline", "/tmp/attach/install/next-linux-gcc8-release/bin/mbgl-offline", - 6422760 + 6463720 ], [ "mbgl-render", "/tmp/attach/install/next-linux-gcc8-release/bin/mbgl-render", - 7143752 + 7254344 ] ] -} +} \ No newline at end of file diff --git a/metrics/next-linux-clang8-release/render-tests/fill-sort-key/literal/metrics.json b/metrics/next-linux-clang8-release/render-tests/fill-sort-key/literal/metrics.json new file mode 100644 index 00000000000..a3bacd4632a --- /dev/null +++ b/metrics/next-linux-clang8-release/render-tests/fill-sort-key/literal/metrics.json @@ -0,0 +1,35 @@ +{ + "network": [ + [ + "probeNetwork - default - end", + 0, + 0 + ], + [ + "probeNetwork - default - start", + 0, + 0 + ] + ], + "gfx": [ + [ + "probeGFX - default - end", + 8, + 9, + 25, + 1, + [ + 131072, + 131072 + ], + [ + 406, + 406 + ], + [ + 1264, + 1264 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/next-linux-clang8-release/render-tests/line-sort-key/literal/metrics.json b/metrics/next-linux-clang8-release/render-tests/line-sort-key/literal/metrics.json new file mode 100644 index 00000000000..12a75988519 --- /dev/null +++ b/metrics/next-linux-clang8-release/render-tests/line-sort-key/literal/metrics.json @@ -0,0 +1,35 @@ +{ + "network": [ + [ + "probeNetwork - default - end", + 0, + 0 + ], + [ + "probeNetwork - default - start", + 0, + 0 + ] + ], + "gfx": [ + [ + "probeGFX - default - end", + 8, + 9, + 17, + 1, + [ + 131072, + 131072 + ], + [ + 166, + 166 + ], + [ + 832, + 832 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/next-linux-gcc8-release/render-tests/fill-sort-key/literal/metrics.json b/metrics/next-linux-gcc8-release/render-tests/fill-sort-key/literal/metrics.json new file mode 100644 index 00000000000..a3bacd4632a --- /dev/null +++ b/metrics/next-linux-gcc8-release/render-tests/fill-sort-key/literal/metrics.json @@ -0,0 +1,35 @@ +{ + "network": [ + [ + "probeNetwork - default - end", + 0, + 0 + ], + [ + "probeNetwork - default - start", + 0, + 0 + ] + ], + "gfx": [ + [ + "probeGFX - default - end", + 8, + 9, + 25, + 1, + [ + 131072, + 131072 + ], + [ + 406, + 406 + ], + [ + 1264, + 1264 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/next-linux-gcc8-release/render-tests/line-sort-key/literal/metrics.json b/metrics/next-linux-gcc8-release/render-tests/line-sort-key/literal/metrics.json new file mode 100644 index 00000000000..12a75988519 --- /dev/null +++ b/metrics/next-linux-gcc8-release/render-tests/line-sort-key/literal/metrics.json @@ -0,0 +1,35 @@ +{ + "network": [ + [ + "probeNetwork - default - end", + 0, + 0 + ], + [ + "probeNetwork - default - start", + 0, + 0 + ] + ], + "gfx": [ + [ + "probeGFX - default - end", + 8, + 9, + 17, + 1, + [ + 131072, + 131072 + ], + [ + 166, + 166 + ], + [ + 832, + 832 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/next-macos-xcode11-release/render-tests/fill-sort-key/literal/metrics.json b/metrics/next-macos-xcode11-release/render-tests/fill-sort-key/literal/metrics.json new file mode 100644 index 00000000000..a3bacd4632a --- /dev/null +++ b/metrics/next-macos-xcode11-release/render-tests/fill-sort-key/literal/metrics.json @@ -0,0 +1,35 @@ +{ + "network": [ + [ + "probeNetwork - default - end", + 0, + 0 + ], + [ + "probeNetwork - default - start", + 0, + 0 + ] + ], + "gfx": [ + [ + "probeGFX - default - end", + 8, + 9, + 25, + 1, + [ + 131072, + 131072 + ], + [ + 406, + 406 + ], + [ + 1264, + 1264 + ] + ] + ] +} \ No newline at end of file diff --git a/metrics/next-macos-xcode11-release/render-tests/line-sort-key/literal/metrics.json b/metrics/next-macos-xcode11-release/render-tests/line-sort-key/literal/metrics.json new file mode 100644 index 00000000000..12a75988519 --- /dev/null +++ b/metrics/next-macos-xcode11-release/render-tests/line-sort-key/literal/metrics.json @@ -0,0 +1,35 @@ +{ + "network": [ + [ + "probeNetwork - default - end", + 0, + 0 + ], + [ + "probeNetwork - default - start", + 0, + 0 + ] + ], + "gfx": [ + [ + "probeGFX - default - end", + 8, + 9, + 17, + 1, + [ + 131072, + 131072 + ], + [ + 166, + 166 + ], + [ + 832, + 832 + ] + ] + ] +} \ No newline at end of file From 1f266b45bc1cf5bec43cbd81a2da587023124401 Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Tue, 17 Dec 2019 11:45:29 +0200 Subject: [PATCH 4/4] [core] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aba93e6979..308b54bf20a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ## Master ### New features +- [core] Port line-sort-key and fill-sort-key ([#15839](https://github.com/mapbox/mapbox-gl-native/pull/15839)) + + The new feature allows to sort line and fill layer features. Similar to `symbol-sort-key`. + - [core] Add image sections to format expression ([#15937](https://github.com/mapbox/mapbox-gl-native/pull/15937)) The new feature allows to embed images into labels.