From 3f6b544a27e3fe6e5faa5fbd1a3a16b34b1aceba Mon Sep 17 00:00:00 2001 From: muyuankai Date: Wed, 25 Oct 2023 15:34:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9loongarch64=E9=9B=86?= =?UTF-8?q?=E6=98=BE=E6=B8=B2=E6=9F=93=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改loongarch64集显渲染方式 Bug: https://pms.uniontech.com/bug-view-220641.html Log: 修改loongarch64集显渲染方式 --- src/backends/mpv/mpv_proxy.cpp | 18 ++++++++++++++---- src/libdmr/compositing_manager.cpp | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/backends/mpv/mpv_proxy.cpp b/src/backends/mpv/mpv_proxy.cpp index c248a0b2..defd198c 100644 --- a/src/backends/mpv/mpv_proxy.cpp +++ b/src/backends/mpv/mpv_proxy.cpp @@ -405,8 +405,13 @@ mpv_handle *MpvProxy::mpv_init() my_set_property(pHandle, "video-sync", "desync"); } if (!fi.exists() && !jmfi.exists() && !mtfi.exists()) { - my_set_property(pHandle, "vo", "gpu,x11"); - m_sInitVo = "gpu,x11"; + if(CompositingManager::get().property("directRendering").toBool()) { + my_set_property(pHandle, "vo", "gpu,x11"); + m_sInitVo = "gpu,x11"; + } else { + my_set_property(pHandle, "vo", "x11"); + m_sInitVo = "x11"; + } } #elif defined (__sw_64__) //Synchronously modify the video output of the SW platform vdpau(powered by zhangfl) @@ -506,8 +511,13 @@ mpv_handle *MpvProxy::mpv_init() my_set_property(pHandle, "video-sync", "desync"); } if (!fi.exists() && !jmfi.exists()) { - my_set_property(pHandle, "vo", "gpu,x11"); - m_sInitVo = "gpu,x11"; + if(CompositingManager::get().property("directRendering").toBool()) { + my_set_property(pHandle, "vo", "gpu,x11"); + m_sInitVo = "gpu,x11"; + } else { + my_set_property(pHandle, "vo", "x11"); + m_sInitVo = "x11"; + } } #endif if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default")) { diff --git a/src/libdmr/compositing_manager.cpp b/src/libdmr/compositing_manager.cpp index d1a500af..eb9cb933 100644 --- a/src/libdmr/compositing_manager.cpp +++ b/src/libdmr/compositing_manager.cpp @@ -98,6 +98,7 @@ CompositingManager::CompositingManager() { initMember(); bool isDriverLoaded = isDriverLoadedCorrectly(); + setProperty("directRendering", isDriverLoaded); //是否支持直接渲染 softDecodeCheck(); //检测是否是kunpeng920(是否走软解码) // bool isI915 = false;