Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/cogl/files: cogl-1.14.1-framebuffer-allocate.patch
Date: Mon, 04 Nov 2013 09:48:05
Message-Id: 20131104094800.293BE2004E@flycatcher.gentoo.org
1 pacho 13/11/04 09:48:00
2
3 Added: cogl-1.14.1-framebuffer-allocate.patch
4 Log:
5 Try to prevent crashes with nvidia-drivers, upstream bug #703174
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
8
9 Revision Changes Path
10 1.1 media-libs/cogl/files/cogl-1.14.1-framebuffer-allocate.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/cogl/files/cogl-1.14.1-framebuffer-allocate.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/cogl/files/cogl-1.14.1-framebuffer-allocate.patch?rev=1.1&content-type=text/plain
14
15 Index: cogl-1.14.1-framebuffer-allocate.patch
16 ===================================================================
17 From 5efbcc10a3420e26859f8e915f0259a0103b7727 Mon Sep 17 00:00:00 2001
18 From: Adel Gadllah <adel.gadllah@×××××.com>
19 Date: Wed, 3 Jul 2013 18:51:53 +0200
20 Subject: [PATCH] offscreen: Allocate the framebuffer in
21 cogl_offscreen_new_to_texture_full
22
23 The API says that it should return NULL on failure but it does not do that
24 due to the lazy allocation.
25
26 https://bugzilla.gnome.org/show_bug.cgi?id=703174
27 ---
28 cogl/cogl-framebuffer.c | 8 ++++++++
29 1 file changed, 8 insertions(+)
30
31 diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
32 index d9ec88d..9649e4d 100644
33 --- a/cogl/cogl-framebuffer.c
34 +++ b/cogl/cogl-framebuffer.c
35 @@ -618,6 +618,7 @@ _cogl_offscreen_new_to_texture_full (CoglTexture *texture,
36 int level_width;
37 int level_height;
38 CoglOffscreen *ret;
39 + CoglError *error = NULL;
40
41 _COGL_RETURN_VAL_IF_FAIL (cogl_is_texture (texture), NULL);
42 _COGL_RETURN_VAL_IF_FAIL (level < _cogl_texture_get_n_levels (texture),
43 @@ -649,6 +650,13 @@ _cogl_offscreen_new_to_texture_full (CoglTexture *texture,
44
45 _cogl_texture_associate_framebuffer (texture, fb);
46
47 + if (!cogl_framebuffer_allocate (ret, &error))
48 + {
49 + cogl_object_unref (offscreen);
50 + cogl_error_free (error);
51 + ret = NULL;
52 + }
53 +
54 return ret;
55 }
56
57 --
58 1.8.3.1