From c770c2326261ee22b22216538a2eaaed3648bc0d Mon Sep 17 00:00:00 2001 From: zmiao Date: Mon, 26 Aug 2019 21:54:59 +0300 Subject: [core] fix mixed sdf + non-sdf icon rendering in one layer (#15456) * [core] fix icon symbol rendring when sdf and non-sdf icon in the same symbol layer * fix build error * fix typo * revert renderableSegment change * simplify codes * fix build error * refine sdf icon flag * [core] fix mixed sdf + non-sdf icon rendering in one layer * remove iconstatus getter in stymbol bucket * fix review findings * provide bitwise operator for SymbolContent enum * use MBGL_MBGL_CONSTEXPR * add one missing update for sdfIcon * make renderer symbol type as enum --- src/mbgl/renderer/buckets/symbol_bucket.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mbgl/renderer/buckets/symbol_bucket.hpp') diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp index 20c0c5b790..d813707c2f 100644 --- a/src/mbgl/renderer/buckets/symbol_bucket.hpp +++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp @@ -55,7 +55,6 @@ public: const style::PropertyValue& textSize, const style::PropertyValue& iconSize, float zoom, - bool sdfIcons, bool iconsNeedLinear, bool sortFeaturesByY, const std::string bucketLeaderID, @@ -72,6 +71,7 @@ public: void updateVertices(Placement&, bool updateOpacities, const TransformState&, const RenderTile&, std::set&) override; bool hasTextData() const; bool hasIconData() const; + bool hasSdfIconData() const; bool hasCollisionBoxData() const; bool hasCollisionCircleData() const; bool hasFormatSectionOverrides() const; @@ -86,7 +86,6 @@ public: float sortedAngle = std::numeric_limits::max(); // Flags - const bool sdfIcons : 1; const bool iconsNeedLinear : 1; const bool sortFeaturesByY : 1; bool staticUploaded : 1; @@ -124,7 +123,8 @@ public: std::unique_ptr iconSizeBinder; Buffer icon; - + Buffer sdfIcon; + struct CollisionBuffer { gfx::VertexVector> vertices; gfx::VertexVector> dynamicVertices; -- cgit v1.2.1