clutter/frame: Add ClutterFrameHint to ClutterFrame
This will allow the backend to provide performance hints to the frame clock in future. Signed-off-by: Mingi Sung <sungmg@saltyming.net>
This commit is contained in:
parent
a1e6d2242b
commit
fcea00f63a
4 changed files with 27 additions and 0 deletions
|
@ -33,6 +33,12 @@ typedef enum _ClutterFrameResult
|
|||
CLUTTER_FRAME_RESULT_IDLE,
|
||||
} ClutterFrameResult;
|
||||
|
||||
typedef enum _ClutterFrameHint
|
||||
{
|
||||
CLUTTER_FRAME_HINT_NONE = 0,
|
||||
CLUTTER_FRAME_HINT_DIRECT_SCANOUT_ATTEMPTED = 1 << 0,
|
||||
} ClutterFrameHint;
|
||||
|
||||
#define CLUTTER_TYPE_FRAME_CLOCK (clutter_frame_clock_get_type ())
|
||||
CLUTTER_EXPORT
|
||||
G_DECLARE_FINAL_TYPE (ClutterFrameClock, clutter_frame_clock,
|
||||
|
|
|
@ -36,6 +36,7 @@ struct _ClutterFrame
|
|||
|
||||
gboolean has_result;
|
||||
ClutterFrameResult result;
|
||||
ClutterFrameHint hints;
|
||||
};
|
||||
|
||||
CLUTTER_EXPORT
|
||||
|
|
|
@ -115,3 +115,16 @@ clutter_frame_set_result (ClutterFrame *frame,
|
|||
frame->result = result;
|
||||
frame->has_result = TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_frame_set_hint (ClutterFrame *frame,
|
||||
ClutterFrameHint hint)
|
||||
{
|
||||
frame->hints |= hint;
|
||||
}
|
||||
|
||||
ClutterFrameHint
|
||||
clutter_frame_get_hints (ClutterFrame *frame)
|
||||
{
|
||||
return frame->hints;
|
||||
}
|
||||
|
|
|
@ -54,4 +54,11 @@ void clutter_frame_set_result (ClutterFrame *frame,
|
|||
CLUTTER_EXPORT
|
||||
gboolean clutter_frame_has_result (ClutterFrame *frame);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_frame_set_hint (ClutterFrame *frame,
|
||||
ClutterFrameHint hint);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
ClutterFrameHint clutter_frame_get_hints (ClutterFrame *frame);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterFrame, clutter_frame_unref)
|
||||
|
|
Loading…
Reference in a new issue