[mutter] renderer/native: Copy mode irrelevant for bo freeing
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] renderer/native: Copy mode irrelevant for bo freeing
- Date: Thu, 16 Jan 2020 20:32:36 +0000 (UTC)
commit fea6abb4f084a0e7886cae46b42baf44c8ac1631
Author: Pekka Paalanen <pekka paalanen collabora com>
Date: Mon Sep 16 16:39:02 2019 +0300
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
src/backends/native/meta-renderer-native.c | 24 ++----------------------
1 file changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 7f7eab5e0..8ecb5f0c3 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -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;
- }
+ g_clear_object (&secondary_gpu_state->gbm.current_fb);
}
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;
- }
+ g_clear_object (&secondary_gpu_state->gbm.next_fb);
}
#ifdef HAVE_EGL_DEVICE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]