Revert index buffers to dirty flag instead of timestamps (#2927)

This commit is contained in:
Alex Cristici
2024-10-16 17:48:46 +03:00
committed by GitHub
parent ff62309e5d
commit e937b0d555
23 changed files with 27 additions and 119 deletions

View File

@@ -13,27 +13,6 @@
#include "android_renderer_backend.hpp"
#include "map_renderer_runnable.hpp"
#if MLN_RENDER_BACKEND_OPENGL
#include <sys/system_properties.h>
namespace {
std::string androidSysProp(const char* key) {
assert(strlen(key) < PROP_NAME_MAX);
if (__system_property_find(key) == nullptr) {
return "";
}
char prop[PROP_VALUE_MAX + 1];
__system_property_get(key, prop);
return prop;
}
bool inEmulator() {
return androidSysProp("ro.kernel.qemu") == "1" || androidSysProp("ro.boot.qemu") == "1" ||
androidSysProp("ro.hardware.egl") == "emulation";
}
} // namespace
#endif
namespace mbgl {
namespace android {
@@ -253,14 +232,6 @@ void MapRenderer::onSurfaceCreated(JNIEnv& env, const jni::Object<AndroidSurface
renderer = std::make_unique<Renderer>(backend->getImpl(), pixelRatio, localIdeographFontFamily);
rendererRef = std::make_unique<ActorRef<Renderer>>(*renderer, mailboxData.getMailbox());
#if MLN_RENDER_BACKEND_OPENGL
// If we're running the emulator with the OpenGL backend, we're going to crash eventually,
// unless we enable this mitigation.
if (inEmulator()) {
renderer->enableAndroidEmulatorGoldfishMitigation(true);
}
#endif
backend->setSwapBehavior(swapBehaviorFlush ? gfx::Renderable::SwapBehaviour::Flush
: gfx::Renderable::SwapBehaviour::NoFlush);