clutter/context: Move get_show_fps to it correct namespace
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
This commit is contained in:
parent
078bbd82c8
commit
39da6e10fa
5 changed files with 12 additions and 13 deletions
|
@ -48,3 +48,5 @@ struct _ClutterContext
|
||||||
};
|
};
|
||||||
|
|
||||||
ClutterStageManager * clutter_context_get_stage_manager (ClutterContext *context);
|
ClutterStageManager * clutter_context_get_stage_manager (ClutterContext *context);
|
||||||
|
|
||||||
|
gboolean clutter_context_get_show_fps (ClutterContext *context);
|
||||||
|
|
|
@ -379,3 +379,9 @@ clutter_context_get_stage_manager (ClutterContext *context)
|
||||||
{
|
{
|
||||||
return context->stage_manager;
|
return context->stage_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
clutter_context_get_show_fps (ClutterContext *context)
|
||||||
|
{
|
||||||
|
return context->show_fps;
|
||||||
|
}
|
||||||
|
|
|
@ -67,14 +67,6 @@ guint clutter_pick_debug_flags = 0;
|
||||||
*/
|
*/
|
||||||
int clutter_max_render_time_constant_us = 1000;
|
int clutter_max_render_time_constant_us = 1000;
|
||||||
|
|
||||||
gboolean
|
|
||||||
_clutter_context_get_show_fps (void)
|
|
||||||
{
|
|
||||||
ClutterContext *context = _clutter_context_get_default ();
|
|
||||||
|
|
||||||
return context->show_fps;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_clutter_threads_dispatch (gpointer data)
|
_clutter_threads_dispatch (gpointer data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -94,8 +94,6 @@ typedef enum
|
||||||
|
|
||||||
ClutterContext * _clutter_context_get_default (void);
|
ClutterContext * _clutter_context_get_default (void);
|
||||||
|
|
||||||
gboolean _clutter_context_get_show_fps (void);
|
|
||||||
|
|
||||||
/* Diagnostic mode */
|
/* Diagnostic mode */
|
||||||
gboolean _clutter_diagnostic_enabled (void);
|
gboolean _clutter_diagnostic_enabled (void);
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,10 @@
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#include "clutter/clutter-context-private.h"
|
||||||
#include "clutter/clutter-damage-history.h"
|
#include "clutter/clutter-damage-history.h"
|
||||||
#include "clutter/clutter-frame-clock.h"
|
#include "clutter/clutter-frame-clock.h"
|
||||||
#include "clutter/clutter-frame-private.h"
|
#include "clutter/clutter-frame-private.h"
|
||||||
#include "clutter/clutter-private.h"
|
|
||||||
#include "clutter/clutter-mutter.h"
|
#include "clutter/clutter-mutter.h"
|
||||||
#include "clutter/clutter-stage-private.h"
|
#include "clutter/clutter-stage-private.h"
|
||||||
#include "cogl/cogl.h"
|
#include "cogl/cogl.h"
|
||||||
|
@ -1045,6 +1045,7 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
|
||||||
clutter_stage_view_get_instance_private (view);
|
clutter_stage_view_get_instance_private (view);
|
||||||
ClutterStage *stage = priv->stage;
|
ClutterStage *stage = priv->stage;
|
||||||
ClutterStageWindow *stage_window = _clutter_stage_get_window (stage);
|
ClutterStageWindow *stage_window = _clutter_stage_get_window (stage);
|
||||||
|
ClutterContext *context = clutter_actor_get_context (CLUTTER_ACTOR (stage));
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage))
|
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage))
|
||||||
return CLUTTER_FRAME_RESULT_IDLE;
|
return CLUTTER_FRAME_RESULT_IDLE;
|
||||||
|
@ -1055,7 +1056,7 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
|
||||||
if (!clutter_actor_is_mapped (CLUTTER_ACTOR (stage)))
|
if (!clutter_actor_is_mapped (CLUTTER_ACTOR (stage)))
|
||||||
return CLUTTER_FRAME_RESULT_IDLE;
|
return CLUTTER_FRAME_RESULT_IDLE;
|
||||||
|
|
||||||
if (_clutter_context_get_show_fps ())
|
if (clutter_context_get_show_fps (context))
|
||||||
begin_frame_timing_measurement (view);
|
begin_frame_timing_measurement (view);
|
||||||
|
|
||||||
_clutter_run_repaint_functions (CLUTTER_REPAINT_FLAGS_PRE_PAINT);
|
_clutter_run_repaint_functions (CLUTTER_REPAINT_FLAGS_PRE_PAINT);
|
||||||
|
@ -1079,7 +1080,7 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
|
||||||
|
|
||||||
clutter_stage_emit_after_paint (stage, view, frame);
|
clutter_stage_emit_after_paint (stage, view, frame);
|
||||||
|
|
||||||
if (_clutter_context_get_show_fps ())
|
if (clutter_context_get_show_fps (context))
|
||||||
end_frame_timing_measurement (view);
|
end_frame_timing_measurement (view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue