diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 28f89bb74d6..5482b7ab088 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: actionlint additional_dependencies: [shellcheck-py] - repo: https://github.com/nicklockwood/SwiftFormat - rev: "0.55.2" + rev: "0.55.3" hooks: - id: swiftformat args: [--swiftversion, "5.8"] diff --git a/include/mbgl/vulkan/context.hpp b/include/mbgl/vulkan/context.hpp index e17160d6589..08e439df3f6 100644 --- a/include/mbgl/vulkan/context.hpp +++ b/include/mbgl/vulkan/context.hpp @@ -146,7 +146,7 @@ class Context final : public gfx::Context { void enqueueDeletion(std::function&& function); void submitOneTimeCommand(const std::function& function) const; - void requestSurfaceUpdate() { surfaceUpdateRequested = true; } + void requestSurfaceUpdate(bool useDelay = true); private: struct FrameResources { @@ -197,6 +197,7 @@ class Context final : public gfx::Context { uint8_t frameResourceIndex = 0; std::vector frameResources; bool surfaceUpdateRequested{false}; + int32_t surfaceUpdateLatency{0}; int32_t currentFrameCount{0}; struct { diff --git a/platform/android/android.cmake b/platform/android/android.cmake index 0f14d074f46..dd01b8f11e1 100644 --- a/platform/android/android.cmake +++ b/platform/android/android.cmake @@ -146,6 +146,14 @@ target_include_directories( ${PROJECT_SOURCE_DIR}/src ) +# this is needed because Android is not officially supported +# https://discourse.cmake.org/t/error-when-crosscompiling-with-whole-archive-target-link/9394 +# https://cmake.org/cmake/help/latest/release/3.24.html#generator-expressions +set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE +"-Wl,--whole-archive -Wl,--no-whole-archive" +) +set(CMAKE_LINK_LIBRARY_USING_WHOLE_ARCHIVE_SUPPORTED True) + find_package(curl CONFIG) target_link_libraries( diff --git a/platform/android/buildSrc/src/main/kotlin/Versions.kt b/platform/android/buildSrc/src/main/kotlin/Versions.kt index 16fd70fae6b..ba52910f87a 100644 --- a/platform/android/buildSrc/src/main/kotlin/Versions.kt +++ b/platform/android/buildSrc/src/main/kotlin/Versions.kt @@ -1,4 +1,4 @@ object Versions { - const val ndkVersion ="27.0.12077973" - const val cmakeVersion = "3.18.1+" + const val ndkVersion = "27.0.12077973" + const val cmakeVersion = "3.24.0+" } \ No newline at end of file diff --git a/platform/ios/src/MLNCompassButton.mm b/platform/ios/src/MLNCompassButton.mm index 3e0597c3c33..009f37ee05a 100644 --- a/platform/ios/src/MLNCompassButton.mm +++ b/platform/ios/src/MLNCompassButton.mm @@ -124,6 +124,8 @@ - (void)showCompass:(BOOL)animated { - (void)hideCompass:(BOOL)animated { animated ? [self animateToAlpha:0] : [self setAlpha:0]; + self.isAccessibilityElement = NO; + self.accessibilityElementsHidden = YES; } - (void)animateToAlpha:(CGFloat)alpha { diff --git a/src/mbgl/gl/upload_pass.cpp b/src/mbgl/gl/upload_pass.cpp index 8243675ff74..324d196098e 100644 --- a/src/mbgl/gl/upload_pass.cpp +++ b/src/mbgl/gl/upload_pass.cpp @@ -271,7 +271,9 @@ gfx::AttributeBindingArray UploadPass::buildAttributeBindings( return; } - overrideAttr->setDirty(false); + if (overrideAttr) { + overrideAttr->setDirty(false); + } bindings[index] = { /*.attribute = */ {defaultAttr.getDataType(), offset}, diff --git a/src/mbgl/gl/vertex_attribute_gl.cpp b/src/mbgl/gl/vertex_attribute_gl.cpp index abd8740fd2e..4ffc2aa9c13 100644 --- a/src/mbgl/gl/vertex_attribute_gl.cpp +++ b/src/mbgl/gl/vertex_attribute_gl.cpp @@ -169,7 +169,7 @@ const std::vector& VertexAttributeGL::getRaw(gfx::VertexAttribute& for (std::size_t i = 0; i < count; ++i) { if (!get(attr.get(i), type, outPtr)) { // missing type conversion - assert(false); + std::fill(outPtr, outPtr + stride_, 0); } outPtr += stride_; } diff --git a/src/mbgl/vulkan/context.cpp b/src/mbgl/vulkan/context.cpp index bfa821aa6ef..e3055c4054f 100644 --- a/src/mbgl/vulkan/context.cpp +++ b/src/mbgl/vulkan/context.cpp @@ -171,6 +171,19 @@ void Context::submitOneTimeCommand(const std::function