Skip to content
Commit 00f112f4 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Allocate less memory for every wl_callback

wl_callback and wl_region are two kinds of objects that are frequently
allocated.

Currently, we make two extra heap allocations per each wl_callback
object. One for the wrapper object (FrameCallback) and the other one is
for its Resource.

With this change, no extra allocations will be made. Also, due to
relying on wl_resource linked lists, the destroy listener implementation
got much simpler.

This won't result in huge memory usage or performance improvements, but
still it's worth reducing the number of memory allocations where possible.
parent 43cfd25d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment