mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Android GL: Delete the JavaGL path, leaving only native EGL
The EGL path from the previous commit is now the only one, so GLSurfaceView and everything that existed to serve it are gone: - NativeRenderer.java and NativeGLSurfaceView.java, deleted. - The javaGL branches in PpssppActivity. GL and Vulkan now share one lifecycle: a plain SurfaceView, startRenderLoopThread() when the surface arrives, joinRenderLoopThread() when it goes away. - The "androidJavaGL" queryConfig, and the AndroidNativeEGL setting and its developer-tools checkbox. - displayInit/displayRender, and with them the "Second time, joining the emuthread and starting it up again" dance - restarting the emu thread from inside a JNI callback because a lost context was only observable as a second onSurfaceCreated. - GraphicsContext::NotifyContextLost, which existed solely because that join drained the render queue on a thread with no current context. The render thread now joins the emu thread with the context still current, so the drain is real work and nothing has to be skipped. - g_emuThread, now that nothing starts an emu thread outside the render loop. Three things displayInit/displayRender did that nothing else did, moved rather than dropped: - EnterVR and the per-frame StartVRRender/UpdateVRInput/FinishVRRender hooks now live in RenderLoopThread's GL branch. Java's GL thread could simply return early and wait for the next vsync when the VR session was inactive; this loop drives itself, so that case sleeps 16ms instead of spinning. Not tested - no headset here. - RECREATE_VIEWS after the emu thread starts, as before. Vulkan never did this, so it's a candidate for removal when the two paths converge. - The thin3d error callback, which surfaces GL errors as OSD messages. That one moved into AndroidEGLGraphicsContext::InitSurface, next to the rest of the context's own setup, matching WindowsGLContext. Tested on a nubia Z2464N (Unisoc UMS9632, Mali-G57, Android 15): cold start, UI, booting a homebrew, backgrounding and resuming both in the menu and in-game, and a density change, which destroys and recreates the activity the way a rotation does. Every cycle tears the EGL context down and builds a new one, and the renderer comes back with FBOs and textures intact. The config ladder's first choice, RGBA8888 D24S8, is what the Java chooser landed on here too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01152igCdjTNhT29qvphPyPC
This commit is contained in:
1 parent
f868976af2
commit
812d8f4c09
13 files changed
+88
-378
No files matched your search
@@ -539,17 +539,6 @@ void DeveloperToolsScreen::CreateGraphicsTab(UI::LinearLayout *list) {
|
||||
});
|
||||
}
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
if (g_Config.iGPUBackend == (int)GPUBackend::OPENGL) {
|
||||
list->Add(new ItemHeader(dev->T("OpenGL")));
|
||||
// Temporary, while the EGL path is being tested on devices - see Core/Config.h.
|
||||
list->Add(new CheckBox(&g_Config.bAndroidNativeEGL, dev->T("Use native EGL instead of GLSurfaceView"), ""))->OnClick.Add([](UI::EventParams &e) {
|
||||
// TODO: Not translating yet, same as the multi-threaded rendering checkbox above.
|
||||
g_OSD.Show(OSDType::MESSAGE_WARNING, "Restart required");
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
if (GetGPUBackend() == GPUBackend::VULKAN && SupportsCustomDriver()) {
|
||||
auto driverChoice = list->Add(new Choice(gr->T("AdrenoTools driver manager")));
|
||||
driverChoice->OnClick.Add([=](UI::EventParams &e) {
|
||||
|
||||
Reference in new issue
Block a user