summaryrefslogtreecommitdiff
path: root/src/mbgl/layout/symbol_layout.hpp
diff options
context:
space:
mode:
authorAnand Thakker <anandthakker@users.noreply.github.com>2017-04-06 15:29:59 -0400
committerGitHub <noreply@github.com>2017-04-06 15:29:59 -0400
commit693c9f3641b3189b4cd439049904c95a516ae609 (patch)
tree8341a16f57ff184a2fe9e085c490e8762eb206ce /src/mbgl/layout/symbol_layout.hpp
parentf9cc044357d60dd5cf15ba951384529f88802089 (diff)
downloadqtlocation-mapboxgl-693c9f3641b3189b4cd439049904c95a516ae609.tar.gz
[core] Add DDS support for {text,icon}-size (#8593)
* Update gl-js and generate style code * Factor out packUint8Pair() helper function * Draft implementation of DDS for {text,icon}-size Ports https://github.com/mapbox/mapbox-gl-js/pull/4455 * Fix text-size/composite-function-line-placement test * Refactor to PaintPropertyBinders-like strategy * Dedupe gl::Program construction * Use exponential function base for interpolation * Dedupe coveringZoomStops method * Fixup tests * Fix CI errors (hidden within #if block)
Diffstat (limited to 'src/mbgl/layout/symbol_layout.hpp')
-rw-r--r--src/mbgl/layout/symbol_layout.hpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mbgl/layout/symbol_layout.hpp b/src/mbgl/layout/symbol_layout.hpp
index d79ccb3273..4ec84f0f58 100644
--- a/src/mbgl/layout/symbol_layout.hpp
+++ b/src/mbgl/layout/symbol_layout.hpp
@@ -6,6 +6,7 @@
#include <mbgl/layout/symbol_instance.hpp>
#include <mbgl/text/bidi.hpp>
#include <mbgl/style/layers/symbol_layer_impl.hpp>
+#include <mbgl/programs/symbol_program.hpp>
#include <memory>
#include <map>
@@ -64,9 +65,15 @@ private:
// Adds placed items to the buffer.
template <typename Buffer>
- void addSymbol(Buffer&, const SymbolQuad&, float scale,
- const bool keepUpright, const style::SymbolPlacementType, const float placementAngle,
- WritingModeType writingModes);
+ void addSymbol(Buffer&,
+ SymbolSizeBinder& sizeBinder,
+ const SymbolQuad&,
+ const SymbolFeature& feature,
+ float scale,
+ const bool keepUpright,
+ const style::SymbolPlacementType,
+ const float placementAngle,
+ WritingModeType writingModes);
const std::string sourceLayerName;
const std::string bucketName;
@@ -75,7 +82,6 @@ private:
const MapMode mode;
style::SymbolLayoutProperties::PossiblyEvaluated layout;
- float textMaxSize;
uintptr_t spriteAtlasMapIndex; // Actually a pointer to the SpriteAtlas for this symbol's layer, but don't use it from worker threads!
@@ -84,6 +90,9 @@ private:
bool sdfIcons = false;
bool iconsNeedLinear = false;
+
+ style::TextSize::UnevaluatedType textSize;
+ style::IconSize::UnevaluatedType iconSize;
std::vector<SymbolInstance> symbolInstances;
std::vector<SymbolFeature> features;