mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter/stage-view: Move framebuffer sanity check into helper
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
This commit is contained in:
parent
5e7ce7ea75
commit
1e284c601c
@ -992,18 +992,11 @@ clutter_stage_view_take_scanout (ClutterStageView *view)
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_stage_view_set_framebuffer (ClutterStageView *view,
|
||||
CoglFramebuffer *framebuffer)
|
||||
sanity_check_framebuffer (ClutterStageView *view)
|
||||
{
|
||||
ClutterStageViewPrivate *priv =
|
||||
clutter_stage_view_get_instance_private (view);
|
||||
|
||||
priv->framebuffer = cogl_object_ref (framebuffer);
|
||||
|
||||
#ifndef G_DISABLE_CHECKS
|
||||
if (priv->framebuffer)
|
||||
{
|
||||
int fb_width, fb_height;
|
||||
G_GNUC_UNUSED int fb_width, fb_height;
|
||||
|
||||
fb_width = cogl_framebuffer_get_width (priv->framebuffer);
|
||||
fb_height = cogl_framebuffer_get_height (priv->framebuffer);
|
||||
@ -1013,7 +1006,18 @@ clutter_stage_view_set_framebuffer (ClutterStageView *view,
|
||||
g_warn_if_fail (fabsf (roundf (fb_height / priv->scale) -
|
||||
fb_height / priv->scale) < FLT_EPSILON);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
clutter_stage_view_set_framebuffer (ClutterStageView *view,
|
||||
CoglFramebuffer *framebuffer)
|
||||
{
|
||||
ClutterStageViewPrivate *priv =
|
||||
clutter_stage_view_get_instance_private (view);
|
||||
|
||||
priv->framebuffer = cogl_object_ref (framebuffer);
|
||||
|
||||
if (priv->framebuffer)
|
||||
sanity_check_framebuffer (view);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user