clutter/stage-view: Add API to check if a shadowfb is used

As a more readable alternative to checking GObject properties.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2468>
This commit is contained in:
Robert Mader 2022-09-01 21:03:12 +02:00 committed by Marge Bot
parent 39e01d8700
commit b071a8366d
2 changed files with 12 additions and 0 deletions

View File

@ -1120,6 +1120,15 @@ clutter_stage_view_get_frame_clock (ClutterStageView *view)
return priv->frame_clock; return priv->frame_clock;
} }
gboolean
clutter_stage_view_has_shadowfb (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
return priv->use_shadowfb;
}
static void static void
handle_frame_clock_before_frame (ClutterFrameClock *frame_clock, handle_frame_clock_before_frame (ClutterFrameClock *frame_clock,
int64_t frame_count, int64_t frame_count,

View File

@ -82,4 +82,7 @@ CoglScanout * clutter_stage_view_peek_scanout (ClutterStageView *view);
CLUTTER_EXPORT CLUTTER_EXPORT
float clutter_stage_view_get_refresh_rate (ClutterStageView *view); float clutter_stage_view_get_refresh_rate (ClutterStageView *view);
CLUTTER_EXPORT
gboolean clutter_stage_view_has_shadowfb (ClutterStageView *view);
#endif /* __CLUTTER_STAGE_VIEW_H__ */ #endif /* __CLUTTER_STAGE_VIEW_H__ */