Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ids1024 committed Jun 28, 2024
1 parent 6660a33 commit 3c50274
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/backend/renderer/utils/wayland.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ impl RendererSurfaceState {
#[profiling::function]
pub(crate) fn update_buffer(&mut self, states: &SurfaceData) {
#[cfg(feature = "backend_drm")]
let mut cached = states.cached_state.get::<DrmSyncobjCachedState>();
let mut guard = states.cached_state.get::<DrmSyncobjCachedState>();
#[cfg(feature = "backend_drm")]
let syncobj_state = cached.current();
let syncobj_state = guard.current();

let mut cached = states.cached_state.get::<SurfaceAttributes>();
let attrs = cached.current();
let mut guard = states.cached_state.get::<SurfaceAttributes>();
let attrs = guard.current();
self.buffer_delta = attrs.buffer_delta.take();

if let Some(delta) = self.buffer_delta {
Expand Down
8 changes: 4 additions & 4 deletions src/wayland/compositor/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,24 @@ impl PrivateSurfaceData {
if let Some(BufferAssignment::NewBuffer(buffer)) = guard.pending().buffer.take() {
buffer.release();
};
drop(guard);
#[cfg(feature = "backend_drm")]
let mut cached = my_data.public_data.cached_state.get::<DrmSyncobjCachedState>();
let mut guard = my_data.public_data.cached_state.get::<DrmSyncobjCachedState>();
#[cfg(feature = "backend_drm")]
if let Some(release_point) = &cached.pending().release_point {
if let Some(release_point) = &guard.pending().release_point {
if let Err(err) = release_point.signal() {
tracing::error!("Failed to signal syncobj release point: {}", err);
}
}
#[cfg(feature = "backend_drm")]
if let Some(release_point) = &cached.current().release_point {
if let Some(release_point) = &guard.current().release_point {
if let Err(err) = release_point.signal() {
tracing::error!("Failed to signal syncobj release point: {}", err);
}
}

let hooks = my_data.destruction_hooks.clone();
// don't hold the mutex while the hooks are invoked
drop(cached);
drop(guard);
drop(my_data);
for hook in hooks {
Expand Down

0 comments on commit 3c50274

Please sign in to comment.