onscreen/native: Unify the failure paths of swap_buffers_with_damage
They're both the same and a third one will be added soon. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3817>
This commit is contained in:
parent
b9269abaf5
commit
0de83166db
1 changed files with 10 additions and 10 deletions
|
@ -1290,6 +1290,7 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
g_autoptr (MetaDrmBuffer) buffer = NULL;
|
||||
MetaKmsCrtc *kms_crtc;
|
||||
MetaKmsDevice *kms_device;
|
||||
COGL_TRACE_SCOPED_ANCHOR (MetaRendererNativePostKmsUpdate);
|
||||
|
||||
COGL_TRACE_BEGIN_SCOPED (MetaRendererNativeSwapBuffers,
|
||||
"Meta::OnscreenNative::swap_buffers_with_damage()");
|
||||
|
@ -1343,10 +1344,7 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
g_warning ("Failed to lock front buffer on %s: %s",
|
||||
meta_device_file_get_path (render_device_file),
|
||||
error->message);
|
||||
|
||||
frame_info->flags |= COGL_FRAME_INFO_FLAG_SYMBOLIC;
|
||||
meta_onscreen_native_notify_frame_complete (onscreen);
|
||||
return;
|
||||
goto swap_failed;
|
||||
}
|
||||
|
||||
primary_gpu_fb = META_DRM_BUFFER (g_steal_pointer (&buffer_gbm));
|
||||
|
@ -1361,10 +1359,7 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
g_warning ("Failed to ensure KMS FB ID on %s: %s",
|
||||
meta_device_file_get_path (render_device_file),
|
||||
error->message);
|
||||
|
||||
frame_info->flags |= COGL_FRAME_INFO_FLAG_SYMBOLIC;
|
||||
meta_onscreen_native_notify_frame_complete (onscreen);
|
||||
return;
|
||||
goto swap_failed;
|
||||
}
|
||||
break;
|
||||
case META_RENDERER_NATIVE_MODE_SURFACELESS:
|
||||
|
@ -1419,8 +1414,8 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
return;
|
||||
}
|
||||
|
||||
COGL_TRACE_BEGIN_SCOPED (MetaRendererNativePostKmsUpdate,
|
||||
"Meta::OnscreenNative::swap_buffers_with_damage#post_pending_update()");
|
||||
COGL_TRACE_BEGIN_ANCHORED (MetaRendererNativePostKmsUpdate,
|
||||
"Meta::OnscreenNative::swap_buffers_with_damage#post_pending_update()");
|
||||
|
||||
switch (renderer_gpu_data->mode)
|
||||
{
|
||||
|
@ -1484,6 +1479,11 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
meta_kms_device_post_update (kms_device, kms_update,
|
||||
META_KMS_UPDATE_FLAG_NONE);
|
||||
clutter_frame_set_result (frame, CLUTTER_FRAME_RESULT_PENDING_PRESENTED);
|
||||
return;
|
||||
|
||||
swap_failed:
|
||||
frame_info->flags |= COGL_FRAME_INFO_FLAG_SYMBOLIC;
|
||||
meta_onscreen_native_notify_frame_complete (onscreen);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
Loading…
Reference in a new issue