mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
clutter/stage: Set framebuffer state directly
clutter_set_viewport always operates on the draw fb, but mutter sometimes has an offscreen fb it uses instead. This commit uses the non-deprecated, clutter_framebuffer_set_viewport function, which takes an explicit fb argument. Closes: https://gitlab.gnome.org/GNOME/mutter/merge_requests/2
This commit is contained in:
parent
dbd053020a
commit
58bb61e161
@ -1486,7 +1486,8 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
|
||||
priv->viewport[1] * fb_scale - viewport_offset_y,
|
||||
priv->viewport[2] * fb_scale,
|
||||
priv->viewport[3] * fb_scale);
|
||||
cogl_set_viewport (priv->viewport[0] * fb_scale - viewport_offset_x,
|
||||
cogl_framebuffer_set_viewport (fb,
|
||||
priv->viewport[0] * fb_scale - viewport_offset_x,
|
||||
priv->viewport[1] * fb_scale - viewport_offset_y,
|
||||
priv->viewport[2] * fb_scale,
|
||||
priv->viewport[3] * fb_scale);
|
||||
@ -3617,6 +3618,7 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage,
|
||||
ClutterStageView *view)
|
||||
{
|
||||
ClutterStagePrivate *priv = stage->priv;
|
||||
CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view);
|
||||
|
||||
if (clutter_stage_view_is_dirty_viewport (view))
|
||||
{
|
||||
@ -3637,7 +3639,8 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage,
|
||||
|
||||
viewport_offset_x = view_layout.x * fb_scale;
|
||||
viewport_offset_y = view_layout.y * fb_scale;
|
||||
cogl_set_viewport (priv->viewport[0] * fb_scale - viewport_offset_x,
|
||||
cogl_framebuffer_set_viewport (fb,
|
||||
priv->viewport[0] * fb_scale - viewport_offset_x,
|
||||
priv->viewport[1] * fb_scale - viewport_offset_y,
|
||||
priv->viewport[2] * fb_scale,
|
||||
priv->viewport[3] * fb_scale);
|
||||
@ -3679,7 +3682,7 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage,
|
||||
|
||||
if (clutter_stage_view_is_dirty_projection (view))
|
||||
{
|
||||
cogl_set_projection_matrix (&priv->projection);
|
||||
cogl_framebuffer_set_projection_matrix (fb, &priv->projection);
|
||||
|
||||
clutter_stage_view_set_dirty_projection (view, FALSE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user