From 546469459fd7a2350cff40fc3e8896fe3581c2f6 Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 5 Jul 2016 22:46:04 +0200 Subject: [ios] #3979 compress telemetry events (#5490) * [ios] #3979 wip gzip telemetry events * [ios] expose compression from core instead of adding a new dependency * [ios] #3979 Exposed decompress from mbgl and added a test case * [ios] #3979 cleanup * [ios] #3979 cleaned up test case * [ios] #3979 cleanup * [ios] #3979 gzip -> deflate --- src/mbgl/util/compression.cpp | 2 +- src/mbgl/util/compression.hpp | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 src/mbgl/util/compression.hpp (limited to 'src') diff --git a/src/mbgl/util/compression.cpp b/src/mbgl/util/compression.cpp index e189991b55..18cb189d02 100644 --- a/src/mbgl/util/compression.cpp +++ b/src/mbgl/util/compression.cpp @@ -1,4 +1,4 @@ -#include "compression.hpp" +#include #include diff --git a/src/mbgl/util/compression.hpp b/src/mbgl/util/compression.hpp deleted file mode 100644 index 8f89a3ac03..0000000000 --- a/src/mbgl/util/compression.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include - -namespace mbgl { -namespace util { - -std::string compress(const std::string &raw); -std::string decompress(const std::string &raw); - -} // namespace util -} // namespace mbgl -- cgit v1.2.1 From c4bd946f9b39a71c44c7677c56e20c143f9f4dd6 Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Wed, 6 Jul 2016 15:25:37 -0700 Subject: [core] Re-close polygons after clipping with clipper (#5596) This pulls in the implementation change in https://github.com/mapbox/ mapbox-gl-native/commit/903d609b40b6d0f4873f7bb46d96f4a06d7b17d6 from the master branch for the iOS 3.3.0 release. --- src/mbgl/tile/geometry_tile.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp index f4589b4052..1a74880377 100644 --- a/src/mbgl/tile/geometry_tile.cpp +++ b/src/mbgl/tile/geometry_tile.cpp @@ -28,6 +28,8 @@ static ClipperLib::Path toClipperPath(const GeometryCoordinates& ring) { static GeometryCoordinates fromClipperPath(const ClipperLib::Path& path) { GeometryCoordinates result; + result.reserve(path.size() + 1); + result.reserve(path.size()); for (const auto& p : path) { using Coordinate = GeometryCoordinates::coordinate_type; @@ -37,6 +39,12 @@ static GeometryCoordinates fromClipperPath(const ClipperLib::Path& path) { assert(p.y <= std::numeric_limits::max()); result.emplace_back(Coordinate(p.x), Coordinate(p.y)); } + + // Clipper does not repeat initial point, but our geometry model requires it. + if (!result.empty()) { + result.push_back(result.front()); + } + return result; } -- cgit v1.2.1