[mutter] MetaRendererX11: Allocate offscreen framebuffers up front
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaRendererX11: Allocate offscreen framebuffers up front
- Date: Wed, 3 Aug 2016 03:22:32 +0000 (UTC)
commit 9b4e8695f3ce068cdedb91cb48db3e70190a84f3
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Jul 25 16:51:14 2016 +0800
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
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 bd604bc..c0405be 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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]