mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
scaled-scene-buffer: reduce unnecessary renderings
Prior to this commit, a backing buffer with scale 1 was always created for a scaled_scene_buffer before showing it, and backing buffers for specific scales were created on output_enter events. This commit removes this redundant re-renderings by calling wlr_scene_buffer_set_dest_size() upon scaled_scene_buffer creation just to receive output_enter events and delaying the first rendering to the first output_enter event. I needed to add font_get_buffer_size() to obtain the size of a font buffer without actually creating it.
This commit is contained in:
parent
cc838e79ed
commit
5db953aa89
6 changed files with 69 additions and 23 deletions
|
|
@ -110,7 +110,8 @@ struct scaled_rect_buffer *scaled_rect_buffer_create(
|
|||
memcpy(self->fill_color, fill_color, sizeof(self->fill_color));
|
||||
memcpy(self->border_color, border_color, sizeof(self->border_color));
|
||||
|
||||
scaled_scene_buffer_invalidate_cache(scaled_buffer);
|
||||
scaled_scene_buffer_request_update(scaled_buffer,
|
||||
self->width, self->height);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue