backend-drm: Cache drm_fb for each weston_buffer
When we first create a drm_fb from a weston_buffer, cache it and keep it alive as long as the buffer lives. This allows us to reuse the gbm_bo and kernel-side DRM framebuffer, rather than constantly creating and destroying them at every repaint. The overhead of doing so (e.g. MMU updates) can be significant on some platforms. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
@@ -1198,6 +1198,7 @@ struct weston_buffer {
|
||||
int32_t width, height;
|
||||
uint32_t busy_count;
|
||||
int y_inverted;
|
||||
void *backend_private;
|
||||
};
|
||||
|
||||
struct weston_buffer_reference {
|
||||
|
||||
Reference in New Issue
Block a user