drm-buffer: Don't always generate fb_id on construction
It might not be needed by the user of the buffer, so don't always require it up front. Instead make sure that any user that needs it first calls "meta_drm_buffer_ensure_fb_id()" to create the ID. Only the plain gbm implementation creates the ID lazilly, the other still does it on construction due to the objects used to create them only existing during construction. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1854>
This commit is contained in:
@ -421,6 +421,9 @@ process_plane_assignment (MetaKmsImplDevice *impl_device,
|
||||
|
||||
buffer = plane_assignment->buffer;
|
||||
|
||||
if (buffer && !meta_drm_buffer_ensure_fb_id (buffer, error))
|
||||
return FALSE;
|
||||
|
||||
meta_topic (META_DEBUG_KMS,
|
||||
"[atomic] Assigning %s plane (%u, %s) to %u, "
|
||||
"%hdx%hd+%hd+%hd -> %dx%d+%d+%d",
|
||||
|
Reference in New Issue
Block a user