diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2016-07-25 16:51:14 +0800 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2016-08-03 11:20:55 +0800 |
commit | 9b4e8695f3ce068cdedb91cb48db3e70190a84f3 (patch) | |
tree | cf37bdabf15facf2442bc1967021a5ac9944ee91 /src/backends/x11/meta-renderer-x11.c | |
parent | adcd0fe9b465d04b593e4c573bdfc687bee9aacd (diff) | |
download | mutter-9b4e8695f3ce068cdedb91cb48db3e70190a84f3.tar.gz |
MetaRendererX11: Allocate offscreen framebuffers up front
Allocate the offscreen stage view framebuffers up front; otherwise they
may get allocated after the viewport calculated by the stage is set,
which would cause the viewport to be incorrect until recalculated.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
Diffstat (limited to 'src/backends/x11/meta-renderer-x11.c')
-rw-r--r-- | src/backends/x11/meta-renderer-x11.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backends/x11/meta-renderer-x11.c b/src/backends/x11/meta-renderer-x11.c index bd604bc73..c0405bedc 100644 --- a/src/backends/x11/meta-renderer-x11.c +++ b/src/backends/x11/meta-renderer-x11.c @@ -78,6 +78,7 @@ meta_renderer_x11_create_view (MetaRenderer *renderer, int width, height; CoglTexture2D *texture_2d; CoglOffscreen *offscreen; + GError *error = NULL; g_assert (meta_is_wayland_compositor ()); @@ -86,6 +87,9 @@ meta_renderer_x11_create_view (MetaRenderer *renderer, texture_2d = cogl_texture_2d_new_with_size (cogl_context, width, height); offscreen = cogl_offscreen_new_with_texture (COGL_TEXTURE (texture_2d)); + if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (offscreen), &error)) + meta_fatal ("Couldn't allocate framebuffer: %s", error->message); + return g_object_new (META_TYPE_RENDERER_VIEW, "layout", &monitor_info->rect, "framebuffer", COGL_FRAMEBUFFER (offscreen), |