render: code cleanup, log double buffering time

* Break out cursor cell dirtying to separate functions
* Break out handling of double buffering
* Handle buffers with age > 1 (we’re swapping between more than 2
  buffers)
* Detect full screen repaints, and skip re-applying old frame’s damage
* Use an allocated array insted of a tll list for old frame’s scroll damage
* When logging frame rendering time, including the amount used for
  double buffering.
This commit is contained in:
Daniel Eklöf 2021-05-08 10:25:14 +02:00
parent a1d2044d75
commit 34becf0df0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 195 additions and 188 deletions

5
shm.h
View file

@ -35,8 +35,9 @@ struct buffer {
bool scrollable;
bool purge; /* True if this buffer should be destroyed */
int age;
tll (struct damage) scroll_damage;
unsigned age;
struct damage *scroll_damage;
size_t scroll_damage_count;
pixman_region32_t dirty;
};