mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
renderer/native: Copy mode irrelevant for bo freeing
Simplify the bo freeing functions by not checking what the copy mode is. This matches what swap_secondary_drm_fb () already does. g_clear_object () is safe to call even if the value is already NULL. The copy mode does not change mid-operation. If it did, this change would ensure we still clean up everything. So this is more future-proof too. https://gitlab.gnome.org/GNOME/mutter/merge_requests/810
This commit is contained in:
parent
94992ffff6
commit
fea6abb4f0
@ -974,17 +974,7 @@ static void
|
||||
free_current_secondary_bo (MetaGpuKms *gpu_kms,
|
||||
MetaOnscreenNativeSecondaryGpuState *secondary_gpu_state)
|
||||
{
|
||||
MetaRendererNativeGpuData *renderer_gpu_data;
|
||||
|
||||
renderer_gpu_data = secondary_gpu_state->renderer_gpu_data;
|
||||
switch (renderer_gpu_data->secondary.copy_mode)
|
||||
{
|
||||
case META_SHARED_FRAMEBUFFER_COPY_MODE_SECONDARY_GPU:
|
||||
g_clear_object (&secondary_gpu_state->gbm.current_fb);
|
||||
break;
|
||||
case META_SHARED_FRAMEBUFFER_COPY_MODE_PRIMARY:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1465,17 +1455,7 @@ static void
|
||||
free_next_secondary_bo (MetaGpuKms *gpu_kms,
|
||||
MetaOnscreenNativeSecondaryGpuState *secondary_gpu_state)
|
||||
{
|
||||
MetaRendererNativeGpuData *renderer_gpu_data;
|
||||
|
||||
renderer_gpu_data = secondary_gpu_state->renderer_gpu_data;
|
||||
switch (renderer_gpu_data->secondary.copy_mode)
|
||||
{
|
||||
case META_SHARED_FRAMEBUFFER_COPY_MODE_SECONDARY_GPU:
|
||||
g_clear_object (&secondary_gpu_state->gbm.next_fb);
|
||||
break;
|
||||
case META_SHARED_FRAMEBUFFER_COPY_MODE_PRIMARY:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_EGL_DEVICE
|
||||
|
Loading…
Reference in New Issue
Block a user