summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-03-30 16:02:59 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-03-31 13:26:27 -0700
commit743d95405363e0eea1b80e8c28bde245211f7868 (patch)
tree98cc6ab0a8980916ca704efd887a029a40d05d0e /src
parentc4f9582bfa9be832eb2eb349249918db8b867ec9 (diff)
downloadqtlocation-mapboxgl-743d95405363e0eea1b80e8c28bde245211f7868.tar.gz
[core] Add DDS support for text-rotate
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/layers/symbol_layer.cpp6
-rw-r--r--src/mbgl/style/layers/symbol_layer_properties.hpp2
-rw-r--r--src/mbgl/style/layout_property.hpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp
index 02e1e364f1..3a896d4c93 100644
--- a/src/mbgl/style/layers/symbol_layer.cpp
+++ b/src/mbgl/style/layers/symbol_layer.cpp
@@ -427,15 +427,15 @@ void SymbolLayer::setTextMaxAngle(PropertyValue<float> value) {
impl->layout.unevaluated.get<TextMaxAngle>() = value;
impl->observer->onLayerLayoutPropertyChanged(*this, "text-max-angle");
}
-PropertyValue<float> SymbolLayer::getDefaultTextRotate() {
+DataDrivenPropertyValue<float> SymbolLayer::getDefaultTextRotate() {
return TextRotate::defaultValue();
}
-PropertyValue<float> SymbolLayer::getTextRotate() const {
+DataDrivenPropertyValue<float> SymbolLayer::getTextRotate() const {
return impl->layout.unevaluated.get<TextRotate>();
}
-void SymbolLayer::setTextRotate(PropertyValue<float> value) {
+void SymbolLayer::setTextRotate(DataDrivenPropertyValue<float> value) {
if (value == getTextRotate())
return;
impl->layout.unevaluated.get<TextRotate>() = value;
diff --git a/src/mbgl/style/layers/symbol_layer_properties.hpp b/src/mbgl/style/layers/symbol_layer_properties.hpp
index e7cfb8d455..4e4c64eec9 100644
--- a/src/mbgl/style/layers/symbol_layer_properties.hpp
+++ b/src/mbgl/style/layers/symbol_layer_properties.hpp
@@ -140,7 +140,7 @@ struct TextMaxAngle : LayoutProperty<float> {
static float defaultValue() { return 45; }
};
-struct TextRotate : LayoutProperty<float> {
+struct TextRotate : DataDrivenLayoutProperty<float> {
static constexpr const char * key = "text-rotate";
static float defaultValue() { return 0; }
};
diff --git a/src/mbgl/style/layout_property.hpp b/src/mbgl/style/layout_property.hpp
index 624ff2bdc5..e2137deb9f 100644
--- a/src/mbgl/style/layout_property.hpp
+++ b/src/mbgl/style/layout_property.hpp
@@ -40,14 +40,14 @@ public:
/*
For layout properties we implement a two step evaluation process: if you have a zoom level,
you can evaluate a set of unevaluated property values, producing a set of possibly evaluated
- values, where non-data-driven property values have been fully evaluated, and data-driven values
- have not.
+ values, where undefined, constant, or camera function values have been fully evaluated, and
+ source or composite function values have not.
Once you also have a particular feature, you can evaluate that set of possibly evaluated values
fully, producing a set of fully evaluated values.
This is in theory maximally efficient in terms of avoiding repeated evaluation of camera
- functions, though it's more of a historical accident that a purposeful optimization.
+ functions, though it's more of a historical accident than a purposeful optimization.
*/
using UnevaluatedTypes = TypeList<typename Ps::UnevaluatedType...>;