diff options
author | Ansis Brammanis <ansis@mapbox.com> | 2019-12-06 12:22:12 -0500 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-12-17 15:46:10 +0200 |
commit | aa543e43e5a161f9ccdb6e9b5cda0923b8284ae2 (patch) | |
tree | 96f24c23a748640be646c94ebc0d9053bd5b7f44 | |
parent | 493d2ca253ffb55921d98168b984573b71189f59 (diff) | |
download | qtlocation-mapboxgl-aa543e43e5a161f9ccdb6e9b5cda0923b8284ae2.tar.gz |
[core] Fix really overscaled lines #16018
-rw-r--r-- | metrics/ignores/platform-all.json | 1 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/line_bucket.cpp | 13 |
2 files changed, 7 insertions, 7 deletions
diff --git a/metrics/ignores/platform-all.json b/metrics/ignores/platform-all.json index c9e7a84be3..44761324fc 100644 --- a/metrics/ignores/platform-all.json +++ b/metrics/ignores/platform-all.json @@ -111,7 +111,6 @@ "render-tests/regressions/mapbox-gl-js#7708": "skip - js specific", "render-tests/regressions/mapbox-gl-js#8026": "skip - js specific", "render-tests/regressions/mapbox-gl-js#8817": "skip - https://github.com/mapbox/mapbox-gl-native/issues/15737", - "render-tests/regressions/mapbox-gl-js#9009": "https://github.com/mapbox/mapbox-gl-native/issues/16018", "render-tests/regressions/mapbox-gl-native#7357": "https://github.com/mapbox/mapbox-gl-native/issues/7357", "render-tests/runtime-styling/image-add-remove-add": "skip - https://github.com/mapbox/mapbox-gl-native/issues/16021", "render-tests/runtime-styling/pattern-add-remove-add": "skip - https://github.com/mapbox/mapbox-gl-native/issues/16021", diff --git a/src/mbgl/renderer/buckets/line_bucket.cpp b/src/mbgl/renderer/buckets/line_bucket.cpp index 895d5aa1bb..c32515e016 100644 --- a/src/mbgl/renderer/buckets/line_bucket.cpp +++ b/src/mbgl/renderer/buckets/line_bucket.cpp @@ -129,18 +129,19 @@ void LineBucket::addGeometry(const GeometryCoordinates& coordinates, const Geome total_length += util::dist<double>(coordinates[i], coordinates[i + 1]); } - lineDistances = Distances{*numericValue<double>(clip_start_it->second), - *numericValue<double>(clip_end_it->second), - total_length}; + lineDistances = Distances{ + *numericValue<double>(clip_start_it->second), *numericValue<double>(clip_end_it->second), total_length}; } const LineJoinType joinType = layout.evaluate<LineJoin>(zoom, feature); const float miterLimit = joinType == LineJoinType::Bevel ? 1.05f : float(layout.get<LineMiterLimit>()); - const double sharpCornerOffset = overscaling == 0 ? - SHARP_CORNER_OFFSET * (float(util::EXTENT) / util::tileSize) : - SHARP_CORNER_OFFSET * (float(util::EXTENT) / (util::tileSize * overscaling)); + const double sharpCornerOffset = + overscaling == 0 + ? SHARP_CORNER_OFFSET * (float(util::EXTENT) / util::tileSize) + : (overscaling <= 16.0 ? SHARP_CORNER_OFFSET * (float(util::EXTENT) / (util::tileSize * overscaling)) + : 0.0f); const GeometryCoordinate firstCoordinate = coordinates[first]; const LineCapType beginCap = layout.get<LineCap>(); |