[feat] prefer hardware video codecs by default

This commit is contained in:
dijunkun
2026-10-22 17:20:48 +08:00
parent f8f4aa3cea
commit 193dcc4be0
22 changed files with 29 additions and 98 deletions
@@ -9,12 +9,8 @@
namespace crossdesk {
void ConfigureLinuxCudaGraphics(bool hardware_acceleration) {
void ConfigureLinuxCudaGraphics() {
#if USE_CUDA && (defined(__x86_64__) || defined(__amd64__))
if (!hardware_acceleration) {
return;
}
// Respect explicit GPU/driver selection, including a request to use Mesa
// or software rendering. Native frames can still use the CPU fallback.
for (const char* name : {"__NV_PRIME_RENDER_OFFLOAD",
@@ -45,8 +41,6 @@ void ConfigureLinuxCudaGraphics(bool hardware_acceleration) {
return;
}
LOG_INFO("Selected NVIDIA PRIME rendering for CUDA/OpenGL video interop");
#else
(void)hardware_acceleration;
#endif
}
@@ -11,7 +11,7 @@ namespace crossdesk {
// Call before SDL or Slint initializes EGL/GLX. Hybrid laptops otherwise
// create the GUI context on the integrated GPU while NVDEC uses NVIDIA.
void ConfigureLinuxCudaGraphics(bool hardware_acceleration);
void ConfigureLinuxCudaGraphics();
} // namespace crossdesk