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:
fufesou
2024-05-28 16:42:30 +08:00
committed by GitHub
parent 010b17509a
commit 72ec86b58d
66 changed files with 481 additions and 282 deletions

View File

@@ -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 {

View File

@@ -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]