Implement dynamic texture atlas (#3198)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
This commit is contained in:
Alex Cristici
2025-05-14 18:38:47 +03:00
committed by GitHub
parent a537956529
commit 8a81444c43
74 changed files with 763 additions and 400 deletions

View File

@@ -202,6 +202,7 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
ignoreReason = it->second;
if (ignoreReason.rfind("skip", 0) == 0) {
printf(ANSI_COLOR_GRAY "* skipped %s (%s)" ANSI_COLOR_RESET "\n", id.c_str(), ignoreReason.c_str());
mbgl::Log::Info(mbgl::Event::General, "* skipped " + id + "(" + ignoreReason + ")");
continue;
}
}
@@ -222,12 +223,14 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
color = "#E8A408";
stats.ignorePassedTests++;
printf(ANSI_COLOR_YELLOW "* ignore %s (%s)" ANSI_COLOR_RESET "\n", id.c_str(), ignoreReason.c_str());
mbgl::Log::Info(mbgl::Event::General, "* ignore " + id + " (" + ignoreReason + ")");
} else {
status = "ignored failed";
color = "#9E9E9E";
stats.ignoreFailedTests++;
printf(
ANSI_COLOR_LIGHT_GRAY "* ignore %s (%s)" ANSI_COLOR_RESET "\n", id.c_str(), ignoreReason.c_str());
mbgl::Log::Info(mbgl::Event::General, "* ignore " + id + " (" + ignoreReason + ")");
}
} else {
// Only fail the bots on render errors, this is a CI limitation that
@@ -244,6 +247,7 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
color = "green";
stats.passedTests++;
printf(ANSI_COLOR_GREEN "* passed %s" ANSI_COLOR_RESET "\n", id.c_str());
mbgl::Log::Info(mbgl::Event::General, "* passed " + id);
} else if (errored) {
status = "errored";
color = "red";
@@ -251,12 +255,15 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
returnCode = 2;
printf(ANSI_COLOR_RED "* errored %s" ANSI_COLOR_RESET "\n", id.c_str());
printf(ANSI_COLOR_RED "* error: %s" ANSI_COLOR_RESET "\n", metadata.errorMessage.c_str());
mbgl::Log::Info(mbgl::Event::General, "* errored " + id);
mbgl::Log::Info(mbgl::Event::General, "* error " + metadata.errorMessage);
} else {
status = "failed";
color = "red";
stats.failedTests++;
returnCode = 3;
printf(ANSI_COLOR_RED "* failed %s" ANSI_COLOR_RESET "\n", id.c_str());
mbgl::Log::Info(mbgl::Event::General, "* failed " + id);
}
}
@@ -278,26 +285,32 @@ int runRenderTests(int argc, char** argv, std::function<void()> testStatus) {
printf(ANSI_COLOR_GREEN "%u passed (%.1lf%%)" ANSI_COLOR_RESET "\n",
stats.passedTests,
100.0 * stats.passedTests / count);
mbgl::Log::Info(mbgl::Event::General, std::to_string(stats.passedTests) + " passed tests");
}
if (stats.ignorePassedTests) {
printf(ANSI_COLOR_YELLOW "%u passed but were ignored (%.1lf%%)" ANSI_COLOR_RESET "\n",
stats.ignorePassedTests,
100.0 * stats.ignorePassedTests / count);
mbgl::Log::Info(mbgl::Event::General,
std::to_string(stats.ignorePassedTests) + " passed tests but were ignored");
}
if (stats.ignoreFailedTests) {
printf(ANSI_COLOR_LIGHT_GRAY "%u ignored (%.1lf%%)" ANSI_COLOR_RESET "\n",
stats.ignoreFailedTests,
100.0 * stats.ignoreFailedTests / count);
mbgl::Log::Info(mbgl::Event::General, std::to_string(stats.ignoreFailedTests) + " ignored tests");
}
if (stats.failedTests) {
printf(ANSI_COLOR_RED "%u failed (%.1lf%%)" ANSI_COLOR_RESET "\n",
stats.failedTests,
100.0 * stats.failedTests / count);
mbgl::Log::Info(mbgl::Event::General, std::to_string(stats.failedTests) + " failed tests");
}
if (stats.erroredTests) {
printf(ANSI_COLOR_RED "%u errored (%.1lf%%)" ANSI_COLOR_RESET "\n",
stats.erroredTests,
100.0 * stats.erroredTests / count);
mbgl::Log::Info(mbgl::Event::General, std::to_string(stats.erroredTests) + " errored tests");
}
printf("Results at: %s\n", mbgl::filesystem::canonical(resultPath).generic_string().c_str());