diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2025-04-15 21:54:07 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-04-15 13:01:24 -0700 |
| commit | 763cd564e32932e5f05b983c93328300f396216b (patch) | |
| tree | 334231bf1468a23060091ebbb84f73a11c3d3b33 /src/render_helpers/texture.rs | |
| parent | 95eafba346a17104a9af71021011fcdc9e13776b (diff) | |
| download | niri-763cd564e32932e5f05b983c93328300f396216b.tar.gz niri-763cd564e32932e5f05b983c93328300f396216b.tar.bz2 niri-763cd564e32932e5f05b983c93328300f396216b.zip | |
chore: update smithay
Diffstat (limited to 'src/render_helpers/texture.rs')
| -rw-r--r-- | src/render_helpers/texture.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render_helpers/texture.rs b/src/render_helpers/texture.rs index 2967c361..b5901ffc 100644 --- a/src/render_helpers/texture.rs +++ b/src/render_helpers/texture.rs @@ -2,7 +2,7 @@ use smithay::backend::allocator::Fourcc; use smithay::backend::renderer::element::{Element, Id, Kind, RenderElement, UnderlyingStorage}; use smithay::backend::renderer::gles::GlesTexture; use smithay::backend::renderer::utils::{CommitCounter, OpaqueRegions}; -use smithay::backend::renderer::{Frame as _, ImportMem, Renderer, Texture}; +use smithay::backend::renderer::{ContextId, Frame as _, ImportMem, Renderer, Texture}; use smithay::utils::{Buffer, Logical, Physical, Point, Rectangle, Scale, Size, Transform}; use super::memory::MemoryBuffer; @@ -12,7 +12,7 @@ use super::memory::MemoryBuffer; pub struct TextureBuffer<T> { id: Id, commit_counter: CommitCounter, - renderer_id: usize, + context_id: ContextId, texture: T, scale: Scale<f64>, transform: Transform, @@ -41,7 +41,7 @@ impl<T> TextureBuffer<T> { TextureBuffer { id: Id::new(), commit_counter: CommitCounter::default(), - renderer_id: renderer.id(), + context_id: renderer.context_id(), texture, scale: scale.into(), transform, @@ -226,7 +226,7 @@ where damage: &[Rectangle<i32, Physical>], opaque_regions: &[Rectangle<i32, Physical>], ) -> Result<(), R::Error> { - if frame.id() != self.buffer.renderer_id { + if frame.context_id() != self.buffer.context_id { warn!("trying to render texture from different renderer"); return Ok(()); } |
