mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
scene/surface: simplify single-pixel-buffer check in surface_reconfigure()
No need to call wlr_client_buffer_get() on wlr_client_buffer.base: we're already manipulating a wlr_client_buffer.
This commit is contained in:
parent
fd069ad4f2
commit
b62c6878e1
1 changed files with 2 additions and 3 deletions
|
|
@ -217,10 +217,9 @@ static void surface_reconfigure(struct wlr_scene_surface *scene_surface) {
|
|||
// can't use the cached scene_buffer->is_single_pixel_buffer
|
||||
// because that's only set later on.
|
||||
bool is_single_pixel_buffer = false;
|
||||
struct wlr_client_buffer *client_buffer = wlr_client_buffer_get(&surface->buffer->base);
|
||||
if (client_buffer != NULL && client_buffer->source != NULL) {
|
||||
if (surface->buffer->source != NULL) {
|
||||
struct wlr_single_pixel_buffer_v1 *spb =
|
||||
wlr_single_pixel_buffer_v1_try_from_buffer(client_buffer->source);
|
||||
wlr_single_pixel_buffer_v1_try_from_buffer(surface->buffer->source);
|
||||
is_single_pixel_buffer = spb != NULL;
|
||||
}
|
||||
if (!is_single_pixel_buffer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue