[mutter] background: Allow using sliced textures for file based backgrounds



commit b7840bec7d135fec3c268b5eab1233d6c6c7cdf6
Author: Ray Strode <rstrode redhat com>
Date:   Fri Jun 14 14:49:13 2013 -0400

    background: Allow using sliced textures for file based backgrounds
    
    Some cards have 2k texture limits, which can be smaller than
    commonly sized backgrounds.
    
    One way to get around this problem is to use Cogl's "sliced texture"
    feature, that transparently uses several hardware textures under the hood.
    
    This commit changes background textures loaded from file to potentially
    use slicing.  Based on a patch by Jasper St. Pierre
    <jstpierre mecheye net>.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702283

 src/compositor/meta-background.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
index b8e0d52..568614f 100644
--- a/src/compositor/meta-background.c
+++ b/src/compositor/meta-background.c
@@ -1090,7 +1090,7 @@ meta_background_load_file_finish (MetaBackground  *self,
 
   texture = cogl_texture_new_from_data (width,
                                         height,
-                                        COGL_TEXTURE_NO_SLICING,
+                                        COGL_TEXTURE_NO_ATLAS,
                                         has_alpha ?
                                         COGL_PIXEL_FORMAT_RGBA_8888 :
                                         COGL_PIXEL_FORMAT_RGB_888,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]