backends/native: Refactor g_object_set() call
Makes sense to update ::layout inside meta_renderer_native_set_legacy_view_size(). https://bugzilla.gnome.org/show_bug.cgi?id=745079
This commit is contained in:
parent
4b4eb3a039
commit
7baa1d8a8d
@ -868,6 +868,7 @@ meta_renderer_native_set_legacy_view_size (MetaRendererNative *renderer_native,
|
|||||||
CoglDisplayEGL *egl_display = cogl_display->winsys;
|
CoglDisplayEGL *egl_display = cogl_display->winsys;
|
||||||
struct gbm_surface *new_surface;
|
struct gbm_surface *new_surface;
|
||||||
EGLSurface new_egl_surface;
|
EGLSurface new_egl_surface;
|
||||||
|
cairo_rectangle_int_t view_layout;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ensure we don't have any pending flips that will want
|
* Ensure we don't have any pending flips that will want
|
||||||
@ -914,6 +915,14 @@ meta_renderer_native_set_legacy_view_size (MetaRendererNative *renderer_native,
|
|||||||
egl_onscreen->egl_surface,
|
egl_onscreen->egl_surface,
|
||||||
egl_display->egl_context);
|
egl_display->egl_context);
|
||||||
|
|
||||||
|
view_layout = (cairo_rectangle_int_t) {
|
||||||
|
.width = width,
|
||||||
|
.height = height
|
||||||
|
};
|
||||||
|
g_object_set (G_OBJECT (view),
|
||||||
|
"layout", &view_layout,
|
||||||
|
NULL);
|
||||||
|
|
||||||
_cogl_framebuffer_winsys_update_size (framebuffer, width, height);
|
_cogl_framebuffer_winsys_update_size (framebuffer, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,7 +270,6 @@ maybe_resize_legacy_view (MetaStageNative *stage_native)
|
|||||||
int width = stage_native->pending_width;
|
int width = stage_native->pending_width;
|
||||||
int height = stage_native->pending_height;
|
int height = stage_native->pending_height;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
cairo_rectangle_int_t view_layout;
|
|
||||||
|
|
||||||
if (!stage_native->pending_resize)
|
if (!stage_native->pending_resize)
|
||||||
return;
|
return;
|
||||||
@ -288,16 +287,7 @@ maybe_resize_legacy_view (MetaStageNative *stage_native)
|
|||||||
meta_warning ("Applying display configuration failed: %s\n",
|
meta_warning ("Applying display configuration failed: %s\n",
|
||||||
error->message);
|
error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
view_layout = (cairo_rectangle_int_t) {
|
|
||||||
.width = width,
|
|
||||||
.height = height
|
|
||||||
};
|
|
||||||
g_object_set (G_OBJECT (legacy_view),
|
|
||||||
"layout", &view_layout,
|
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user