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

[core] Prepare changelog for maps-v1.2.1 (2020.02-release-vanillashake) patch release #16245

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## master

## maps-v1.2.1 (2020.02-release-vanillashake)

### 🐞 Bug fixes

- [core] Revert shader changes from [#16189](https://github.com/mapbox/mapbox-gl-native/pull/16189), which will cause incorrect label positioning ([#16235](https://github.com/mapbox/mapbox-gl-native/pull/16235))

This is a back porting from GL JS [#9333](https://github.com/mapbox/mapbox-gl-js/pull/9333)

- [ios] Restored support for iOS 9–11 by default ([#16241](https://github.com/mapbox/mapbox-gl-native/pull/16242))

## maps-v1.2.0 (2020.02-release-vanillashake)

### ✨ New features
Expand Down
5 changes: 4 additions & 1 deletion metrics/ignores/platform-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"expression-tests/legacy/interval/composite-default": "https://github.com/mapbox/mapbox-gl-native/issues/12747",
"expression-tests/legacy/interval/tokens-zoom": "https://github.com/mapbox/mapbox-gl-native/issues/12747",
"expression-tests/resolved-locale/basic": "Even the 'en' locale may not be present on some test systems.",
"expression-tests/within/invalid-geojson": "skip - to be released in 1.3.0",
"expression-tests/within/line-within-polygon": "skip - to be released in 1.3.0",
"probes/file-size/fail-file-doesnt-match": "Should fail, doesn't match the expectation.",
"probes/file-size/fail-file-not-found": "Should fail, file not found.",
"probes/file-size/fail-size-is-over": "Should fail, size is bigger than expected.",
Expand Down Expand Up @@ -131,5 +133,6 @@
"render-tests/feature-state/promote-id-fill-extrusion": "https://github.com/mapbox/mapbox-gl-js/pull/9202",
"render-tests/text-variable-anchor/left-top-right-buttom-offset-tile-map-mode":"https://github.com/mapbox/mapbox-gl-js/pull/9202",
"render-tests/line-pattern/with-dasharray":"https://github.com/mapbox/mapbox-gl-js/pull/9189",
"render-tests/symbol-sort-key/placement-tile-boundary-right-then-left": "https://github.com/mapbox/mapbox-gl-js/pull/9054"
"render-tests/symbol-sort-key/placement-tile-boundary-right-then-left": "https://github.com/mapbox/mapbox-gl-js/pull/9054",
"render-tests/within/paint-line": "skip - to be released in 1.3.0"
}
2 changes: 1 addition & 1 deletion platform/ios/ios.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ target_compile_definitions(
)

if(NOT DEFINED IOS_DEPLOYMENT_TARGET)
set(IOS_DEPLOYMENT_TARGET "12.0")
set(IOS_DEPLOYMENT_TARGET "9.0")
endif()

macro(initialize_ios_target target)
Expand Down
10 changes: 1 addition & 9 deletions src/mbgl/layout/symbol_projection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,7 @@ namespace mbgl {
fontSize * perspectiveRatio :
fontSize / perspectiveRatio;

const auto transformedTileAnchor = project(placedSymbol.anchorPoint, labelPlaneMatrix);

// Skip labels behind the camera
if (transformedTileAnchor.second <= 0.0) {
hideGlyphs(placedSymbol.glyphOffsets.size(), dynamicVertexArray);
continue;
}

const Point<float> anchorPoint = transformedTileAnchor.first;
const Point<float> anchorPoint = project(placedSymbol.anchorPoint, labelPlaneMatrix).first;

PlacementResult placeUnflipped = placeGlyphsAlongLine(placedSymbol, pitchScaledFontSize, false /*unflipped*/, keepUpright, posMatrix, labelPlaneMatrix, glCoordMatrix, dynamicVertexArray, anchorPoint, state.getSize().aspectRatio());

Expand Down
834 changes: 416 additions & 418 deletions src/mbgl/programs/gl/shader_source.cpp

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions src/mbgl/programs/gl/symbol_icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ struct ShaderSource;
template <>
struct ShaderSource<SymbolIconProgram> {
static constexpr const char* name = "symbol_icon";
static constexpr const uint8_t hash[8] = {0x17, 0x8a, 0xb9, 0xa4, 0x9d, 0xd2, 0xe1, 0x90};
static constexpr const uint8_t hash[8] = {0xa9, 0xd8, 0x73, 0xdf, 0xd9, 0xd8, 0x82, 0xf2};
static constexpr const auto vertexOffset = 50247;
static constexpr const auto fragmentOffset = 53077;
static constexpr const auto fragmentOffset = 52996;
};

constexpr const char* ShaderSource<SymbolIconProgram>::name;
Expand Down Expand Up @@ -142,10 +142,6 @@ void main() {
vec4 projected_pos = u_label_plane_matrix * vec4(a_projected_pos.xy, 0.0, 1.0);
gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * max(a_minFontScale, fontScale) + a_pxoffset / 16.0), 0.0, 1.0);

// Symbols might end up being behind the camera. Modify z-value to be out of visible bounds
// if this is the case, otherwise ignore depth. -1.1 is safely out of the visible depth range [-1, 1]
gl_Position.z = mix(-1.1 * gl_Position.w, gl_Position.z, float(projected_pos.w > 0.0));

v_tex = a_tex / u_texsize;
vec2 fade_opacity = unpack_opacity(a_fade_opacity);
float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;
Expand Down
10 changes: 3 additions & 7 deletions src/mbgl/programs/gl/symbol_sdf_icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ struct ShaderSource;
template <>
struct ShaderSource<SymbolSDFIconProgram> {
static constexpr const char* name = "symbol_sdf_icon";
static constexpr const uint8_t hash[8] = {0x5a, 0xe9, 0x60, 0x5b, 0xb1, 0xc3, 0x2b, 0x3b};
static constexpr const auto vertexOffset = 53482;
static constexpr const auto fragmentOffset = 57603;
static constexpr const uint8_t hash[8] = {0x46, 0xe9, 0x60, 0xde, 0x1e, 0x85, 0x36, 0x54};
static constexpr const auto vertexOffset = 53401;
static constexpr const auto fragmentOffset = 57441;
};

constexpr const char* ShaderSource<SymbolSDFIconProgram>::name;
Expand Down Expand Up @@ -217,10 +217,6 @@ void main() {
gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale + a_pxoffset), 0.0, 1.0);
float gamma_scale = gl_Position.w;

// Symbols might end up being behind the camera. Modify z-value to be out of visible bounds
// if this is the case, otherwise ignore depth. -1.1 is safely out of the visible depth range [-1, 1]
gl_Position.z = mix(-1.1 * gl_Position.w, gl_Position.z, float(projected_pos.w > 0.0));

vec2 fade_opacity = unpack_opacity(a_fade_opacity);
float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;
float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));
Expand Down
10 changes: 3 additions & 7 deletions src/mbgl/programs/gl/symbol_sdf_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ struct ShaderSource;
template <>
struct ShaderSource<SymbolSDFTextProgram> {
static constexpr const char* name = "symbol_sdf_text";
static constexpr const uint8_t hash[8] = {0x5a, 0xe9, 0x60, 0x5b, 0xb1, 0xc3, 0x2b, 0x3b};
static constexpr const auto vertexOffset = 53482;
static constexpr const auto fragmentOffset = 57603;
static constexpr const uint8_t hash[8] = {0x46, 0xe9, 0x60, 0xde, 0x1e, 0x85, 0x36, 0x54};
static constexpr const auto vertexOffset = 53401;
static constexpr const auto fragmentOffset = 57441;
};

constexpr const char* ShaderSource<SymbolSDFTextProgram>::name;
Expand Down Expand Up @@ -217,10 +217,6 @@ void main() {
gl_Position = u_coord_matrix * vec4(projected_pos.xy / projected_pos.w + rotation_matrix * (a_offset / 32.0 * fontScale + a_pxoffset), 0.0, 1.0);
float gamma_scale = gl_Position.w;

// Symbols might end up being behind the camera. Modify z-value to be out of visible bounds
// if this is the case, otherwise ignore depth. -1.1 is safely out of the visible depth range [-1, 1]
gl_Position.z = mix(-1.1 * gl_Position.w, gl_Position.z, float(projected_pos.w > 0.0));

vec2 fade_opacity = unpack_opacity(a_fade_opacity);
float fade_change = fade_opacity[1] > 0.5 ? u_fade_change : -u_fade_change;
float interpolated_fade_opacity = max(0.0, min(1.0, fade_opacity[0] + fade_change));
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/programs/gl/symbol_text_and_icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ template <>
struct ShaderSource<SymbolTextAndIconProgram> {
static constexpr const char* name = "symbol_text_and_icon";
static constexpr const uint8_t hash[8] = {0x7e, 0xbe, 0x72, 0x43, 0x55, 0x8e, 0xb5, 0xeb};
static constexpr const auto vertexOffset = 59439;
static constexpr const auto fragmentOffset = 63495;
static constexpr const auto vertexOffset = 59277;
static constexpr const auto fragmentOffset = 63333;
};

constexpr const char* ShaderSource<SymbolTextAndIconProgram>::name;
Expand Down