2019-06-17 18:24:02 -03:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 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_STAGE_VIEW_PRIVATE_H__
|
|
|
|
#define __CLUTTER_STAGE_VIEW_PRIVATE_H__
|
|
|
|
|
|
|
|
#include "clutter/clutter-stage-view.h"
|
2020-05-22 22:57:39 +02:00
|
|
|
#include "clutter/clutter-types.h"
|
2019-06-17 18:24:02 -03:00
|
|
|
|
2021-05-10 16:16:15 +02:00
|
|
|
CLUTTER_EXPORT
|
2020-05-05 19:22:10 +02:00
|
|
|
void clutter_stage_view_after_paint (ClutterStageView *view,
|
|
|
|
cairo_region_t *redraw_clip);
|
2019-06-17 18:24:02 -03:00
|
|
|
|
2021-05-10 16:16:15 +02:00
|
|
|
CLUTTER_EXPORT
|
2020-05-05 19:25:23 +02:00
|
|
|
void clutter_stage_view_before_swap_buffer (ClutterStageView *view,
|
|
|
|
const cairo_region_t *swap_region);
|
|
|
|
|
2019-06-17 18:24:02 -03:00
|
|
|
gboolean clutter_stage_view_is_dirty_viewport (ClutterStageView *view);
|
|
|
|
|
2020-04-30 21:59:49 +02:00
|
|
|
void clutter_stage_view_invalidate_viewport (ClutterStageView *view);
|
2019-06-17 18:24:02 -03:00
|
|
|
|
2020-04-30 21:51:10 +02:00
|
|
|
void clutter_stage_view_set_viewport (ClutterStageView *view,
|
|
|
|
float x,
|
|
|
|
float y,
|
|
|
|
float width,
|
|
|
|
float height);
|
|
|
|
|
2019-06-17 18:24:02 -03:00
|
|
|
gboolean clutter_stage_view_is_dirty_projection (ClutterStageView *view);
|
|
|
|
|
2020-04-30 21:59:49 +02:00
|
|
|
void clutter_stage_view_invalidate_projection (ClutterStageView *view);
|
2019-06-17 18:24:02 -03:00
|
|
|
|
2020-09-11 15:57:28 -03:00
|
|
|
void clutter_stage_view_set_projection (ClutterStageView *view,
|
|
|
|
const graphene_matrix_t *matrix);
|
2020-04-30 21:51:10 +02:00
|
|
|
|
2021-01-26 17:07:09 +01:00
|
|
|
CLUTTER_EXPORT
|
2020-02-06 10:12:54 +01:00
|
|
|
void clutter_stage_view_add_redraw_clip (ClutterStageView *view,
|
|
|
|
const cairo_rectangle_int_t *clip);
|
|
|
|
|
|
|
|
gboolean clutter_stage_view_has_full_redraw_clip (ClutterStageView *view);
|
|
|
|
|
|
|
|
gboolean clutter_stage_view_has_redraw_clip (ClutterStageView *view);
|
|
|
|
|
|
|
|
const cairo_region_t * clutter_stage_view_peek_redraw_clip (ClutterStageView *view);
|
|
|
|
|
2021-05-10 16:16:15 +02:00
|
|
|
CLUTTER_EXPORT
|
2020-02-06 10:12:54 +01:00
|
|
|
cairo_region_t * clutter_stage_view_take_redraw_clip (ClutterStageView *view);
|
2019-06-17 18:24:02 -03:00
|
|
|
|
2021-05-10 16:16:15 +02:00
|
|
|
CLUTTER_EXPORT
|
2019-09-12 11:28:50 +02:00
|
|
|
CoglScanout * clutter_stage_view_take_scanout (ClutterStageView *view);
|
|
|
|
|
2021-05-10 16:16:15 +02:00
|
|
|
CLUTTER_EXPORT
|
2020-05-05 19:05:36 +02:00
|
|
|
void clutter_stage_view_transform_rect_to_onscreen (ClutterStageView *view,
|
|
|
|
const cairo_rectangle_int_t *src_rect,
|
|
|
|
int dst_width,
|
|
|
|
int dst_height,
|
|
|
|
cairo_rectangle_int_t *dst_rect);
|
|
|
|
|
2021-01-26 17:07:09 +01:00
|
|
|
CLUTTER_EXPORT
|
clutter: Paint views with individual frame clocks
Replace the default master clock with multiple frame clocks, each
driving its own stage view. As each stage view represents one CRTC, this
means we draw each CRTC with its own designated frame clock,
disconnected from all the others.
For example this means we when using the native backend will never need
to wait for one monitor to vsync before painting another, so e.g. having
a 144 Hz monitor next to a 60 Hz monitor, things including both Wayland
and X11 applications and shell UI will be able to render at the
corresponding monitor refresh rate.
This also changes a warning about missed frames when sending
_NETWM_FRAME_TIMINGS messages to a debug log entry, as it's expected
that we'll start missing frames e.g. when a X11 window (via Xwayland) is
exclusively within a stage view that was not painted, while another one
was, still increasing the global frame clock.
Addititonally, this also requires the X11 window actor to schedule
timeouts for _NET_WM_FRAME_DRAWN/_NET_WM_FRAME_TIMINGS event emitting,
if the actor wasn't on any stage views, as now we'll only get the frame
callbacks on actors when they actually were painted, while in the past,
we'd invoke that vfunc when anything was painted.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/903
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
2020-05-30 00:27:56 +02:00
|
|
|
void clutter_stage_view_schedule_update (ClutterStageView *view);
|
|
|
|
|
2021-05-10 16:16:15 +02:00
|
|
|
CLUTTER_EXPORT
|
clutter: Paint views with individual frame clocks
Replace the default master clock with multiple frame clocks, each
driving its own stage view. As each stage view represents one CRTC, this
means we draw each CRTC with its own designated frame clock,
disconnected from all the others.
For example this means we when using the native backend will never need
to wait for one monitor to vsync before painting another, so e.g. having
a 144 Hz monitor next to a 60 Hz monitor, things including both Wayland
and X11 applications and shell UI will be able to render at the
corresponding monitor refresh rate.
This also changes a warning about missed frames when sending
_NETWM_FRAME_TIMINGS messages to a debug log entry, as it's expected
that we'll start missing frames e.g. when a X11 window (via Xwayland) is
exclusively within a stage view that was not painted, while another one
was, still increasing the global frame clock.
Addititonally, this also requires the X11 window actor to schedule
timeouts for _NET_WM_FRAME_DRAWN/_NET_WM_FRAME_TIMINGS event emitting,
if the actor wasn't on any stage views, as now we'll only get the frame
callbacks on actors when they actually were painted, while in the past,
we'd invoke that vfunc when anything was painted.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/903
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
2020-05-30 00:27:56 +02:00
|
|
|
void clutter_stage_view_notify_presented (ClutterStageView *view,
|
|
|
|
ClutterFrameInfo *frame_info);
|
|
|
|
|
2021-05-10 16:16:15 +02:00
|
|
|
CLUTTER_EXPORT
|
2020-10-10 00:37:05 +02:00
|
|
|
void clutter_stage_view_notify_ready (ClutterStageView *view);
|
|
|
|
|
2022-01-26 18:39:27 +01:00
|
|
|
void clutter_stage_view_invalidate_input_devices (ClutterStageView *view);
|
|
|
|
|
2019-06-17 18:24:02 -03:00
|
|
|
#endif /* __CLUTTER_STAGE_VIEW_PRIVATE_H__ */
|