From b071a8366d70b3a24f1230e594453e664f5d590a Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 1 Sep 2022 21:03:12 +0200 Subject: [PATCH] clutter/stage-view: Add API to check if a shadowfb is used As a more readable alternative to checking GObject properties. Part-of: --- clutter/clutter/clutter-stage-view.c | 9 +++++++++ clutter/clutter/clutter-stage-view.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/clutter/clutter/clutter-stage-view.c b/clutter/clutter/clutter-stage-view.c index 22c764799..aa98e6a62 100644 --- a/clutter/clutter/clutter-stage-view.c +++ b/clutter/clutter/clutter-stage-view.c @@ -1120,6 +1120,15 @@ clutter_stage_view_get_frame_clock (ClutterStageView *view) 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 handle_frame_clock_before_frame (ClutterFrameClock *frame_clock, int64_t frame_count, diff --git a/clutter/clutter/clutter-stage-view.h b/clutter/clutter/clutter-stage-view.h index c2cf76abf..c8974d00d 100644 --- a/clutter/clutter/clutter-stage-view.h +++ b/clutter/clutter/clutter-stage-view.h @@ -82,4 +82,7 @@ CoglScanout * clutter_stage_view_peek_scanout (ClutterStageView *view); CLUTTER_EXPORT float clutter_stage_view_get_refresh_rate (ClutterStageView *view); +CLUTTER_EXPORT +gboolean clutter_stage_view_has_shadowfb (ClutterStageView *view); + #endif /* __CLUTTER_STAGE_VIEW_H__ */