]> git.mdlowis.com Git - proto/labwc.git/commit
scaled-scene-buffer: reduce unnecessary renderings
authortokyo4j <hrak1529@gmail.com>
Tue, 3 Dec 2024 07:18:52 +0000 (16:18 +0900)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Wed, 18 Dec 2024 08:21:29 +0000 (17:21 +0900)
commit5db953aa899609af7d634491bade5418aa351262
tree7959a5e95f8ecfaa8c0577f6241838f6d2fab678
parentcc838e79eded8ea7e991b92afea36dd59d5f08ea
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.
include/common/font.h
include/common/scaled-scene-buffer.h
src/common/font.c
src/common/scaled-font-buffer.c
src/common/scaled-rect-buffer.c
src/common/scaled-scene-buffer.c