vulkan: skip async transfer if damage is empty
This commit is contained in:
parent
9534da89a2
commit
d7d0cbf9e2
1 changed files with 3 additions and 0 deletions
|
|
@ -77,6 +77,9 @@ impl VulkanShmImage {
|
||||||
callback: Rc<dyn AsyncShmGfxTextureCallback>,
|
callback: Rc<dyn AsyncShmGfxTextureCallback>,
|
||||||
tt: TransferType,
|
tt: TransferType,
|
||||||
) -> Result<Option<PendingShmTransfer>, VulkanError> {
|
) -> Result<Option<PendingShmTransfer>, VulkanError> {
|
||||||
|
if damage.is_empty() {
|
||||||
|
return Ok(None);
|
||||||
|
}
|
||||||
let data = self.async_data.as_ref().unwrap();
|
let data = self.async_data.as_ref().unwrap();
|
||||||
let res = self.try_async_transfer(img, staging, data, client_mem, damage, tt);
|
let res = self.try_async_transfer(img, staging, data, client_mem, damage, tt);
|
||||||
match res {
|
match res {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue