[Fix] (MG_Impl/EGLImpl, MG_Backend): handle EGL current handoff for NeoForge earlydisplay

Treat valid-display no-surface eglMakeCurrent calls as EGL release requests, keep EGLState and backend current records consistent across threads, and rebind the native DirectGLES EGL context during attach/release.

Add EGLState coverage for cross-thread owner transfer and same-thread release/reattach behavior.
This commit is contained in:
2026-06-30 16:44:38 +08:00
parent 2f1949e093
commit 5b116696f0
12 changed files with 271 additions and 20 deletions
+9 -5
View File
@@ -1,5 +1,9 @@
apply plugin: 'com.android.library'
def mobileGlLogActiveLevel = {
(rootProject.findProperty('mobilegl.logLevel') ?: System.getenv('MOBILEGL_LOG_ACTIVE_LEVEL') ?: 'MOBILEGL_LOG_LEVEL_INFO') as String
}
android {
namespace 'top.mobilegl.mobilegl'
compileSdk 34
@@ -9,11 +13,11 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// externalNativeBuild {
// cmake {
// arguments "-DMOBILEGL_ENABLE_TRACY=ON"
// }
// }
externalNativeBuild {
cmake {
arguments "-DMOBILEGL_LOG_ACTIVE_LEVEL=${mobileGlLogActiveLevel()}"
}
}
}
buildTypes {