mirror of
https://github.com/labwc/labwc.git
synced 2026-02-27 01:40:30 -05: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
|
|
@ -36,6 +36,12 @@ int font_height(struct font *font);
|
|||
*/
|
||||
int font_width(struct font *font, const char *string);
|
||||
|
||||
/**
|
||||
* font_get_buffer_size - dry-run font_buffer_create() to get buffer size
|
||||
*/
|
||||
void font_get_buffer_size(int max_width, const char *text, struct font *font,
|
||||
int *width, int *height);
|
||||
|
||||
/**
|
||||
* font_buffer_create - Create ARGB8888 lab_data_buffer using pango
|
||||
* @buffer: buffer pointer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue