cursor-renderer/native: Cast MetaGpu to MetaGpuKms only if it is one
Fixes crash in gnome-shell CSS styling test. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4289>
This commit is contained in:
parent
8223f58b98
commit
fac0854a4f
@ -329,7 +329,7 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *cursor_renderer,
|
|||||||
MetaRendererView *renderer_view = META_RENDERER_VIEW (view);
|
MetaRendererView *renderer_view = META_RENDERER_VIEW (view);
|
||||||
MetaCrtc *crtc = meta_renderer_view_get_crtc (renderer_view);
|
MetaCrtc *crtc = meta_renderer_view_get_crtc (renderer_view);
|
||||||
MetaCrtcNative *crtc_native = META_CRTC_NATIVE (crtc);
|
MetaCrtcNative *crtc_native = META_CRTC_NATIVE (crtc);
|
||||||
MetaGpuKms *gpu_kms = META_GPU_KMS (meta_crtc_get_gpu (crtc));
|
MetaGpu *gpu = meta_crtc_get_gpu (crtc);
|
||||||
ClutterColorState *target_color_state =
|
ClutterColorState *target_color_state =
|
||||||
clutter_stage_view_get_output_color_state (CLUTTER_STAGE_VIEW (view));
|
clutter_stage_view_get_output_color_state (CLUTTER_STAGE_VIEW (view));
|
||||||
CursorStageView *cursor_stage_view = NULL;
|
CursorStageView *cursor_stage_view = NULL;
|
||||||
@ -339,7 +339,7 @@ meta_cursor_renderer_native_update_cursor (MetaCursorRenderer *cursor_renderer,
|
|||||||
g_assert (cursor_stage_view);
|
g_assert (cursor_stage_view);
|
||||||
|
|
||||||
if (!META_IS_CRTC_KMS (crtc) ||
|
if (!META_IS_CRTC_KMS (crtc) ||
|
||||||
!is_hw_cursor_available_for_gpu (gpu_kms) ||
|
!is_hw_cursor_available_for_gpu (META_GPU_KMS (gpu)) ||
|
||||||
!meta_crtc_native_is_hw_cursor_supported (crtc_native))
|
!meta_crtc_native_is_hw_cursor_supported (crtc_native))
|
||||||
{
|
{
|
||||||
if (cursor_stage_view->has_hw_cursor)
|
if (cursor_stage_view->has_hw_cursor)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user