|
|
3c14d2 |
From b7840bec7d135fec3c268b5eab1233d6c6c7cdf6 Mon Sep 17 00:00:00 2001
|
|
|
3c14d2 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
3c14d2 |
Date: Fri, 14 Jun 2013 14:49:13 -0400
|
|
|
3c14d2 |
Subject: [PATCH] background: Allow using sliced textures for file based
|
|
|
3c14d2 |
backgrounds
|
|
|
3c14d2 |
|
|
|
3c14d2 |
Some cards have 2k texture limits, which can be smaller than
|
|
|
3c14d2 |
commonly sized backgrounds.
|
|
|
3c14d2 |
|
|
|
3c14d2 |
One way to get around this problem is to use Cogl's "sliced texture"
|
|
|
3c14d2 |
feature, that transparently uses several hardware textures under the hood.
|
|
|
3c14d2 |
|
|
|
3c14d2 |
This commit changes background textures loaded from file to potentially
|
|
|
3c14d2 |
use slicing. Based on a patch by Jasper St. Pierre
|
|
|
3c14d2 |
<jstpierre@mecheye.net>.
|
|
|
3c14d2 |
|
|
|
3c14d2 |
https://bugzilla.gnome.org/show_bug.cgi?id=702283
|
|
|
3c14d2 |
---
|
|
|
3c14d2 |
src/compositor/meta-background.c | 2 +-
|
|
|
3c14d2 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
3c14d2 |
|
|
|
3c14d2 |
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
|
|
|
3c14d2 |
index b8e0d52..568614f 100644
|
|
|
3c14d2 |
--- a/src/compositor/meta-background.c
|
|
|
3c14d2 |
+++ b/src/compositor/meta-background.c
|
|
|
3c14d2 |
@@ -1090,7 +1090,7 @@ meta_background_load_file_finish (MetaBackground *self,
|
|
|
3c14d2 |
|
|
|
3c14d2 |
texture = cogl_texture_new_from_data (width,
|
|
|
3c14d2 |
height,
|
|
|
3c14d2 |
- COGL_TEXTURE_NO_SLICING,
|
|
|
3c14d2 |
+ COGL_TEXTURE_NO_ATLAS,
|
|
|
3c14d2 |
has_alpha ?
|
|
|
3c14d2 |
COGL_PIXEL_FORMAT_RGBA_8888 :
|
|
|
3c14d2 |
COGL_PIXEL_FORMAT_RGB_888,
|
|
|
3c14d2 |
--
|
|
|
3c14d2 |
1.8.4.2
|
|
|
3c14d2 |
|