Bump NDK version to 27.0.12077973, replace ALooper_pollAll with ALooper_pollOnce (#2663)
This commit is contained in:
@@ -1297,6 +1297,13 @@ if (MLN_WITH_CLANG_TIDY)
|
||||
set_target_properties(mbgl-core PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND}")
|
||||
endif()
|
||||
|
||||
set_source_files_properties(
|
||||
${PROJECT_SOURCE_DIR}/platform/default/src/mbgl/util/utf.cpp
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS
|
||||
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:-Wno-deprecated-declarations>
|
||||
)
|
||||
|
||||
source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${INCLUDE_FILES})
|
||||
source_group(TREE ${PROJECT_SOURCE_DIR}/src FILES ${SRC_FILES})
|
||||
|
||||
@@ -1452,4 +1459,4 @@ endif()
|
||||
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/test)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/benchmark)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/render-test)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/render-test)
|
||||
@@ -1,6 +1,6 @@
|
||||
ext {
|
||||
androidSdkVersions = [
|
||||
ndkVersion : '25.1.8937393',
|
||||
ndkVersion : '27.0.12077973',
|
||||
cmakeVersion : '3.18.1+',
|
||||
]
|
||||
}
|
||||
|
||||
@@ -92,10 +92,10 @@ void checkLinkStatus(GLuint program) {
|
||||
if (isLinked == GL_FALSE) {
|
||||
GLint maxLength = 0;
|
||||
glGetProgramiv(program, GL_INFO_LOG_LENGTH, &maxLength);
|
||||
GLchar infoLog[maxLength];
|
||||
glGetProgramInfoLog(program, maxLength, &maxLength, &infoLog[0]);
|
||||
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, &infoLog[0]);
|
||||
throw Error(infoLog);
|
||||
std::vector<GLchar> infoLog(maxLength);
|
||||
glGetProgramInfoLog(program, maxLength, &maxLength, infoLog.data());
|
||||
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, infoLog.data());
|
||||
throw Error(std::string(infoLog.begin(), infoLog.end()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,10 +107,10 @@ void checkCompileStatus(GLuint shader) {
|
||||
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &maxLength);
|
||||
|
||||
// The maxLength includes the NULL character
|
||||
GLchar errorLog[maxLength];
|
||||
glGetShaderInfoLog(shader, maxLength, &maxLength, &errorLog[0]);
|
||||
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, &errorLog[0]);
|
||||
throw Error(errorLog);
|
||||
std::vector<GLchar> errorLog(maxLength);
|
||||
glGetShaderInfoLog(shader, maxLength, &maxLength, errorLog.data());
|
||||
__android_log_write(ANDROID_LOG_ERROR, LOG_TAG, errorLog.data());
|
||||
throw Error(std::string(errorLog.begin(), errorLog.end()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,10 @@ void RunLoop::run() {
|
||||
while (impl->running) {
|
||||
process();
|
||||
auto timeout = impl->processRunnables().count();
|
||||
ALooper_pollAll(timeout, &outFd, &outEvents, reinterpret_cast<void**>(&outData));
|
||||
auto result = ALooper_pollOnce(timeout, &outFd, &outEvents, reinterpret_cast<void**>(&outData));
|
||||
if (result == ALOOPER_POLL_ERROR) {
|
||||
throw std::runtime_error("ALooper_pollOnce returned an error");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,17 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "utf_conversion",
|
||||
srcs = ["src/mbgl/util/utf.cpp"],
|
||||
copts = CPP_FLAGS + MAPLIBRE_FLAGS + [
|
||||
"-Wno-deprecated-declarations",
|
||||
],
|
||||
deps = [
|
||||
"//:mbgl-core",
|
||||
],
|
||||
)
|
||||
|
||||
# From: platform/ios/core-files.json
|
||||
# Mostly platform/default
|
||||
cc_library(
|
||||
@@ -53,7 +64,6 @@ cc_library(
|
||||
"src/mbgl/util/monotonic_timer.cpp",
|
||||
"src/mbgl/util/png_writer.cpp",
|
||||
"src/mbgl/util/thread_local.cpp",
|
||||
"src/mbgl/util/utf.cpp",
|
||||
] + select({
|
||||
"//:metal_renderer": ["src/mbgl/mtl/headless_backend.cpp"],
|
||||
"//conditions:default": ["src/mbgl/gl/headless_backend.cpp"],
|
||||
@@ -125,6 +135,7 @@ cc_library(
|
||||
"//test:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
":utf_conversion",
|
||||
"//:mbgl-core",
|
||||
] + select({
|
||||
"@platforms//os:ios": [
|
||||
|
||||
@@ -6,9 +6,6 @@
|
||||
namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
std::u16string convertUTF8ToUTF16(const std::string& str) {
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> conv;
|
||||
|
||||
@@ -21,7 +18,5 @@ std::string convertUTF16ToUTF8(const std::u16string& str) {
|
||||
return conv.to_bytes(str);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
} // namespace util
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user