[mutter/wip/garnacho/wayland-emulated-output-transform: 4/15] backends/native: Refactor g_object_set() call
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/garnacho/wayland-emulated-output-transform: 4/15] backends/native: Refactor g_object_set() call
- Date: Mon, 8 Aug 2016 11:59:27 +0000 (UTC)
commit 68824426dcd4a073d75325753c841a4c63d901ae
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jul 31 23:51:43 2016 +0200
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
src/backends/native/meta-renderer-native.c | 9 +++++++++
src/backends/native/meta-stage-native.c | 10 ----------
2 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index d775136..895f850 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -868,6 +868,7 @@ meta_renderer_native_set_legacy_view_size (MetaRendererNative *renderer_native,
CoglDisplayEGL *egl_display = cogl_display->winsys;
struct gbm_surface *new_surface;
EGLSurface new_egl_surface;
+ cairo_rectangle_int_t view_layout;
/*
* 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_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);
}
diff --git a/src/backends/native/meta-stage-native.c b/src/backends/native/meta-stage-native.c
index 2dadbb9..617a707 100644
--- a/src/backends/native/meta-stage-native.c
+++ b/src/backends/native/meta-stage-native.c
@@ -270,7 +270,6 @@ maybe_resize_legacy_view (MetaStageNative *stage_native)
int width = stage_native->pending_width;
int height = stage_native->pending_height;
GError *error = NULL;
- cairo_rectangle_int_t view_layout;
if (!stage_native->pending_resize)
return;
@@ -288,16 +287,7 @@ maybe_resize_legacy_view (MetaStageNative *stage_native)
meta_warning ("Applying display configuration failed: %s\n",
error->message);
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]