1
0
Fork 0
forked from wry/wry

fix: store single-pixel colors outside of buffer storage

This commit is contained in:
Julian Orth 2024-02-06 14:57:06 +01:00
parent 8abaa3ec87
commit 421be6854b
2 changed files with 7 additions and 12 deletions

View file

@ -3,7 +3,7 @@ use {
format::ARGB8888,
gfx_api::{BufferPoints, GfxApiOpt},
ifs::{
wl_buffer::{WlBuffer, WlBufferStorage},
wl_buffer::WlBuffer,
wl_callback::WlCallback,
wl_surface::{
xdg_surface::XdgSurface, zwlr_layer_surface_v1::ZwlrLayerSurfaceV1, WlSurface,
@ -400,7 +400,7 @@ impl Renderer<'_> {
max_width,
max_height,
);
} else if let Some(WlBufferStorage::Color(color)) = &*buffer.storage.borrow() {
} else if let Some(color) = &buffer.color {
if let Some(rect) =
Rect::new_sized(x, y, tsize.0.min(max_width), tsize.1.min(max_height))
{