Update to 1.18.2
This commit is contained in:
		
							parent
							
								
									c0f8e15039
								
							
						
					
					
						commit
						f885b9fd92
					
				| @ -1,58 +0,0 @@ | ||||
| From 5556241b67a58b1d28997e752ecf45244f6003d1 Mon Sep 17 00:00:00 2001 | ||||
| From: Felix Riemann <friemann@gnome.org> | ||||
| Date: Sat, 12 Apr 2014 00:26:00 +0200 | ||||
| Subject: [PATCH] atlas-texture: Keep reference on potential destination atlas | ||||
| 
 | ||||
| When a new CoglAtlasTexture tries to fit into an existing CoglAtlas | ||||
| it should make sure the atlas stays valid while it expands. | ||||
| 
 | ||||
| https://bugzilla.gnome.org/show_bug.cgi?id=728064 | ||||
| 
 | ||||
| Reviewed-by: Neil Roberts <neil@linux.intel.com> | ||||
| (cherry picked from commit 2eec9758f67e9073371c2edd63379324849373c4) | ||||
| ---
 | ||||
|  cogl/cogl-atlas-texture.c | 28 +++++++++++++++++++--------- | ||||
|  1 file changed, 19 insertions(+), 9 deletions(-) | ||||
| 
 | ||||
| diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c
 | ||||
| index beaaf24..1c8b569 100644
 | ||||
| --- a/cogl/cogl-atlas-texture.c
 | ||||
| +++ b/cogl/cogl-atlas-texture.c
 | ||||
| @@ -746,15 +746,25 @@ allocate_space (CoglAtlasTexture *atlas_tex,
 | ||||
|   | ||||
|    /* Look for an existing atlas that can hold the texture */ | ||||
|    for (l = ctx->atlases; l; l = l->next) | ||||
| -    /* Try to make some space in the atlas for the texture */
 | ||||
| -    if (_cogl_atlas_reserve_space (atlas = l->data,
 | ||||
| -                                   /* Add two pixels for the border */
 | ||||
| -                                   width + 2, height + 2,
 | ||||
| -                                   atlas_tex))
 | ||||
| -      {
 | ||||
| -        cogl_object_ref (atlas);
 | ||||
| -        break;
 | ||||
| -      }
 | ||||
| +    {
 | ||||
| +      /* We need to take a reference on the atlas before trying to
 | ||||
| +       * reserve space because in some circumstances atlas migration
 | ||||
| +       * can cause the atlas to be freed */
 | ||||
| +      atlas = cogl_object_ref (l->data);
 | ||||
| +      /* Try to make some space in the atlas for the texture */
 | ||||
| +      if (_cogl_atlas_reserve_space (atlas,
 | ||||
| +                                     /* Add two pixels for the border */
 | ||||
| +                                     width + 2, height + 2,
 | ||||
| +                                     atlas_tex))
 | ||||
| +        {
 | ||||
| +          /* keep the atlas reference */
 | ||||
| +          break;
 | ||||
| +        }
 | ||||
| +      else
 | ||||
| +        {
 | ||||
| +          cogl_object_unref (atlas);
 | ||||
| +        }
 | ||||
| +    }
 | ||||
|   | ||||
|    /* If we couldn't find a suitable atlas then start another */ | ||||
|    if (l == NULL) | ||||
| -- 
 | ||||
| 1.9.3 | ||||
| 
 | ||||
							
								
								
									
										11
									
								
								cogl.spec
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								cogl.spec
									
									
									
									
									
								
							| @ -5,8 +5,8 @@ | ||||
| #global with_tests 1 | ||||
| 
 | ||||
| Name:          cogl | ||||
| Version:       1.18.0 | ||||
| Release:       4%{?dist} | ||||
| Version:       1.18.2 | ||||
| Release:       1%{?dist} | ||||
| Summary:       A library for using 3D graphics hardware to draw pretty pictures | ||||
| 
 | ||||
| Group:         Development/Libraries | ||||
| @ -14,9 +14,6 @@ License:       LGPLv2+ | ||||
| URL:           http://www.clutter-project.org/ | ||||
| Source0:       http://download.gnome.org/sources/cogl/1.18/cogl-%{version}.tar.xz | ||||
| 
 | ||||
| # Backported upstream fix for a totem crash | ||||
| Patch0:        0001-atlas-texture-Keep-reference-on-potential-destinatio.patch | ||||
| 
 | ||||
| BuildRequires: cairo-devel | ||||
| BuildRequires: gdk-pixbuf2-devel | ||||
| BuildRequires: glib2-devel | ||||
| @ -87,7 +84,6 @@ This package contains the installable tests for %{cogl}. | ||||
| 
 | ||||
| %prep | ||||
| %setup -q | ||||
| %patch0 -p1 | ||||
| 
 | ||||
| %build | ||||
| CFLAGS="$RPM_OPT_FLAGS -fPIC" | ||||
| @ -146,6 +142,9 @@ rm %{buildroot}%{_datadir}/cogl/examples-data/crate.jpg | ||||
| %endif | ||||
| 
 | ||||
| %changelog | ||||
| * Fri Jul 04 2014 Kalev Lember <kalevlember@gmail.com> - 1.18.2-1 | ||||
| - Update to 1.18.2 | ||||
| 
 | ||||
| * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.18.0-4 | ||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user