mutter/clutter/clutter/clutter-frame-private.h
Robert Mader ff246a2dc8 clutter/frame: Add API to query minimal render time of a frame
It will be used to schedule Wayland frame events independently from both
update and presentation time, as the former may happen multiple times
frame and the later not at all.

For frame events we want a timing that is just late enough to ensure
that a following commit by a Wayland client will not get included into
the current frame any more.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2823>
2023-04-17 09:16:10 +00:00

50 lines
1.5 KiB
C

/*
* Copyright (C) 2020 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CLUTTER_FRAME_PRIVATE_H
#define CLUTTER_FRAME_PRIVATE_H
#include "clutter/clutter-frame.h"
typedef void (* ClutterFrameRelease) (ClutterFrame *frame);
struct _ClutterFrame
{
grefcount ref_count;
ClutterFrameRelease release;
int64_t frame_count;
gboolean has_target_presentation_time;
int64_t target_presentation_time_us;
int64_t min_render_time_allowed_us;
gboolean has_result;
ClutterFrameResult result;
};
CLUTTER_EXPORT
gpointer clutter_frame_new (size_t size,
ClutterFrameRelease release);
#define clutter_frame_new(FrameType, release) \
((FrameType *) (clutter_frame_new (sizeof (FrameType), release)))
ClutterFrameResult clutter_frame_get_result (ClutterFrame *frame);
#endif /* CLUTTER_FRAME_PRIVATE_H */