screencopy: Fix copying to opaque shm formats
This commit is contained in:
parent
cf9ae91e96
commit
35766a372b
1 changed files with 2 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ use cosmic_protocols::screencopy::v1::server::zcosmic_screencopy_session_v1::{
|
|||
};
|
||||
use smithay::{
|
||||
backend::{
|
||||
allocator::dmabuf::Dmabuf,
|
||||
allocator::{dmabuf::Dmabuf, format::get_transparent},
|
||||
drm::DrmNode,
|
||||
egl::EGLDevice,
|
||||
renderer::{
|
||||
|
|
@ -565,6 +565,7 @@ where
|
|||
// ensure consistency, the SHM handler of smithay should ensure this
|
||||
assert!((offset + (height - 1) * stride + width * pixelsize) as usize <= len);
|
||||
|
||||
let format = get_transparent(format).unwrap_or(format);
|
||||
let mapping = renderer
|
||||
.copy_framebuffer(Rectangle::from_loc_and_size((0, 0), buffer_size), format)?;
|
||||
let gl_data = renderer.map_texture(&mapping)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue