Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
fix really overscaled lines #16018
Browse files Browse the repository at this point in the history
  • Loading branch information
ansis committed Dec 6, 2019
1 parent 6f9edf8 commit fc4f7ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion platform/node/test/ignores.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
"render-tests/icon-text-fit/stretch-three-part": "https://github.com/mapbox/mapbox-gl-native/issues/16017",
"render-tests/icon-text-fit/stretch-two-part": "https://github.com/mapbox/mapbox-gl-native/issues/16017",
"render-tests/icon-text-fit/stretch-underscale": "https://github.com/mapbox/mapbox-gl-native/issues/16017",
"render-tests/regressions/mapbox-gl-js#9009": "https://github.com/mapbox/mapbox-gl-native/issues/16018",
"render-tests/zoomed-fill/negative-zoom": "https://github.com/mapbox/mapbox-gl-native/issues/16019",
"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",
Expand Down
13 changes: 7 additions & 6 deletions src/mbgl/renderer/buckets/line_bucket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down

0 comments on commit fc4f7ad

Please sign in to comment.