From 982af8ff10187fd3c13eec21b8d8e483089f4a82 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Mon, 28 Apr 2025 12:38:23 -0700 Subject: [PATCH] Update `smithay` with `ContextId` changes The new type bounds seem to be addressable using `AsGlowRenderer`. Though things like this will need a different solution when we want to support Pixman rendering. --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/backend/render/mod.rs | 15 ++++++++++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c60b353..8e74900e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4736,7 +4736,7 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smithay" version = "0.5.0" -source = "git+https://github.com/smithay/smithay//?rev=ce61c9b#ce61c9b3293b13adf03863848426f0d7c4907c3e" +source = "git+https://github.com/smithay/smithay//?rev=14b51bd#14b51bd896fe46ba048fe6fd24136455eb36dbee" dependencies = [ "aliasable", "appendlist", diff --git a/Cargo.toml b/Cargo.toml index bb1974fc..7ecae55a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -124,4 +124,4 @@ cosmic-protocols = { git = "https://github.com/pop-os//cosmic-protocols", branch cosmic-client-toolkit = { git = "https://github.com/pop-os//cosmic-protocols", branch = "main" } [patch."https://github.com/smithay/smithay"] -smithay = { git = "https://github.com/smithay/smithay//", rev = "ce61c9b" } +smithay = { git = "https://github.com/smithay/smithay//", rev = "14b51bd" } diff --git a/src/backend/render/mod.rs b/src/backend/render/mod.rs index d311763d..4ee1cd10 100644 --- a/src/backend/render/mod.rs +++ b/src/backend/render/mod.rs @@ -1011,7 +1011,7 @@ pub struct PostprocessState { } impl PostprocessState { - pub fn new_with_renderer>( + pub fn new_with_renderer>( renderer: &mut R, format: Fourcc, output_config: PostprocessOutputConfig, @@ -1022,7 +1022,7 @@ impl PostprocessState { let texture = Offscreen::::create_buffer(renderer, format, buffer_size)?; let texture_buffer = TextureRenderBuffer::from_texture( - renderer, + renderer.glow_renderer(), texture, 1, Transform::Normal, @@ -1042,7 +1042,7 @@ impl PostprocessState { }) } - pub fn track_cursor>( + pub fn track_cursor>( &mut self, renderer: &mut R, format: Fourcc, @@ -1069,8 +1069,13 @@ impl PostprocessState { let texture = Offscreen::::create_buffer(renderer, format, buffer_size)?; - let texture_buffer = - TextureRenderBuffer::from_texture(renderer, texture, 1, Transform::Normal, None); + let texture_buffer = TextureRenderBuffer::from_texture( + renderer.glow_renderer(), + texture, + 1, + Transform::Normal, + None, + ); let damage_tracker = OutputDamageTracker::new(size, scale, Transform::Normal);