mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
Add some more argument validation
This is all internal, so we shouldn't need it; unfortunately, it seems we're passing invalid data internally, so for the time being catching inconsistencies should at least emit a warning for us to backtrace.
This commit is contained in:
parent
f66e1de0e3
commit
884ead03e1
@ -276,8 +276,9 @@ int _clutter_stage_get_pending_swaps (ClutterStage *stage);
|
||||
|
||||
gboolean _clutter_stage_has_full_redraw_queued (ClutterStage *stage);
|
||||
|
||||
void _clutter_stage_set_pick_buffer_valid (ClutterStage *stage, gboolean valid);
|
||||
gboolean _clutter_stage_get_pick_buffer_valid (ClutterStage *stage);
|
||||
void _clutter_stage_set_pick_buffer_valid (ClutterStage *stage,
|
||||
gboolean valid);
|
||||
gboolean _clutter_stage_get_pick_buffer_valid (ClutterStage *stage);
|
||||
void _clutter_stage_increment_picks_per_frame_counter (ClutterStage *stage);
|
||||
void _clutter_stage_reset_picks_per_frame_counter (ClutterStage *stage);
|
||||
guint _clutter_stage_get_picks_per_frame_counter (ClutterStage *stage);
|
||||
|
@ -2949,29 +2949,40 @@ clutter_stage_get_no_clear_hint (ClutterStage *stage)
|
||||
gboolean
|
||||
_clutter_stage_get_pick_buffer_valid (ClutterStage *stage)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE);
|
||||
|
||||
return stage->priv->have_valid_pick_buffer;
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_stage_set_pick_buffer_valid (ClutterStage *stage, gboolean valid)
|
||||
_clutter_stage_set_pick_buffer_valid (ClutterStage *stage,
|
||||
gboolean valid)
|
||||
{
|
||||
stage->priv->have_valid_pick_buffer = valid;
|
||||
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
||||
|
||||
stage->priv->have_valid_pick_buffer = !!valid;
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_stage_increment_picks_per_frame_counter (ClutterStage *stage)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
||||
|
||||
stage->priv->picks_per_frame++;
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_stage_reset_picks_per_frame_counter (ClutterStage *stage)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
||||
|
||||
stage->priv->picks_per_frame = 0;
|
||||
}
|
||||
|
||||
guint
|
||||
_clutter_stage_get_picks_per_frame_counter (ClutterStage *stage)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), 0);
|
||||
|
||||
return stage->priv->picks_per_frame;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user