mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
refact: texture render as an option (#8168)
* refact: texture render as an option Signed-off-by: fufesou <linlong1266@gmail.com> * refact: texture render, translation Signed-off-by: fufesou <linlong1266@gmail.com> * refact: texture render as option Signed-off-by: fufesou <linlong1266@gmail.com> * Update ui_interface.rs --------- Signed-off-by: fufesou <linlong1266@gmail.com> Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
@@ -2053,6 +2053,7 @@ pub mod keys {
|
||||
pub const OPTION_ENABLE_CONFIRM_CLOSING_TABS: &str = "enable-confirm-closing-tabs";
|
||||
pub const OPTION_ENABLE_OPEN_NEW_CONNECTIONS_IN_TABS: &str =
|
||||
"enable-open-new-connections-in-tabs";
|
||||
pub const OPTION_TEXTURE_RENDER: &str = "use-texture-render";
|
||||
pub const OPTION_ENABLE_CHECK_UPDATE: &str = "enable-check-update";
|
||||
pub const OPTION_SYNC_AB_WITH_RECENT_SESSIONS: &str = "sync-ab-with-recent-sessions";
|
||||
pub const OPTION_SYNC_AB_TAGS: &str = "sync-ab-tags";
|
||||
@@ -2133,6 +2134,7 @@ pub mod keys {
|
||||
OPTION_LANGUAGE,
|
||||
OPTION_ENABLE_CONFIRM_CLOSING_TABS,
|
||||
OPTION_ENABLE_OPEN_NEW_CONNECTIONS_IN_TABS,
|
||||
OPTION_TEXTURE_RENDER,
|
||||
OPTION_SYNC_AB_WITH_RECENT_SESSIONS,
|
||||
OPTION_SYNC_AB_TAGS,
|
||||
OPTION_FILTER_AB_BY_INTERSECTION,
|
||||
|
||||
@@ -419,7 +419,7 @@ impl Encoder {
|
||||
impl Decoder {
|
||||
pub fn supported_decodings(
|
||||
id_for_perfer: Option<&str>,
|
||||
_flutter: bool,
|
||||
_use_texture_render: bool,
|
||||
_luid: Option<i64>,
|
||||
mark_unsupported: &Vec<CodecFormat>,
|
||||
) -> SupportedDecoding {
|
||||
@@ -454,7 +454,7 @@ impl Decoder {
|
||||
};
|
||||
}
|
||||
#[cfg(feature = "vram")]
|
||||
if enable_vram_option() && _flutter {
|
||||
if enable_vram_option() && _use_texture_render {
|
||||
decoding.ability_h264 |= if VRamDecoder::available(CodecFormat::H264, _luid).len() > 0 {
|
||||
1
|
||||
} else {
|
||||
|
||||
@@ -88,6 +88,11 @@ impl ImageRgb {
|
||||
pub fn stride(&self) -> usize {
|
||||
self.stride
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_stride(&mut self, stride: usize) {
|
||||
self.stride = stride;
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user