Reputation: 41
I am currently studying the Android 13 Emulator codebase and have encountered an issue related to how Unity-based games perform differently with double buffering versus triple buffering enabled in the Android environment.
Issue: When I enable triple buffering, the Unity game runs at 30 FPS. However, when I switch to double buffering, the FPS drops to around 20-23. I am aware that triple buffering introduces an additional buffer, which can increase latency, and I would prefer to use double buffering to maintain lower latency. However, the significant FPS drop with double buffering is problematic.
Objective: I aim to modify the SurfaceFlinger code in the AOSP (Android Open Source Project) to enable triple buffering but immediately composite the latest buffer queued by the app, similar to how double buffering behaves. This would allow me to maintain the target FPS without the additional latency typically associated with triple buffering.
Question:
Any guidance or suggestions on the specific components or functions in SurfaceFlinger that I should focus on would be greatly appreciated.
Upvotes: 0
Views: 73