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
This commit is contained in:
Ray Strode 2013-06-14 14:49:13 -04:00
parent f743539886
commit b7840bec7d

View File

@ -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,