[clutter/wip/pango-share-atlas: 14/14] cogl-debug: Add an option to disable atlasing sharing
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/pango-share-atlas: 14/14] cogl-debug: Add an option to disable atlasing sharing
- Date: Thu, 5 May 2011 15:41:05 +0000 (UTC)
commit 6d9458debb9eaa7db6750f5eb35c9f322c0b8b7e
Author: Neil Roberts <neil linux intel com>
Date: Wed Mar 30 16:39:38 2011 +0100
cogl-debug: Add an option to disable atlasing sharing
If COGL_DEBUG contains disable-shared-atlas Cogl will not try to share
the atlas between glyphs and images.
clutter/cogl/cogl/cogl-debug-options.h | 6 ++++++
clutter/cogl/cogl/cogl-debug.c | 1 +
clutter/cogl/cogl/cogl-debug.h | 1 +
clutter/cogl/pango/cogl-pango-glyph-cache.c | 3 +++
4 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/clutter/cogl/cogl/cogl-debug-options.h b/clutter/cogl/cogl/cogl-debug-options.h
index 38027f5..58d1283 100644
--- a/clutter/cogl/cogl/cogl-debug-options.h
+++ b/clutter/cogl/cogl/cogl-debug-options.h
@@ -112,6 +112,12 @@ OPT (DISABLE_ATLAS,
"disable-atlas",
"Disable texture atlasing",
"Disable use of texture atlasing")
+OPT (DISABLE_SHARED_ATLAS,
+ "Root Cause",
+ "disable-shared-atlas",
+ "Disable sharing the texture atlas between text and images",
+ "When this is set the glyph cache will always use a separate texture "
+ "for its atlas. Otherwise it will try to share the atlas with images.")
OPT (DISABLE_TEXTURING,
"Root Cause",
"disable-texturing",
diff --git a/clutter/cogl/cogl/cogl-debug.c b/clutter/cogl/cogl/cogl-debug.c
index c0f28d4..5b3ecc8 100644
--- a/clutter/cogl/cogl/cogl-debug.c
+++ b/clutter/cogl/cogl/cogl-debug.c
@@ -68,6 +68,7 @@ static const GDebugKey cogl_behavioural_debug_keys[] = {
{ "disable-software-transform", COGL_DEBUG_DISABLE_SOFTWARE_TRANSFORM },
{ "dump-atlas-image", COGL_DEBUG_DUMP_ATLAS_IMAGE },
{ "disable-atlas", COGL_DEBUG_DISABLE_ATLAS },
+ { "disable-shared-atlas", COGL_DEBUG_DISABLE_SHARED_ATLAS },
{ "disable-texturing", COGL_DEBUG_DISABLE_TEXTURING},
{ "disable-arbfp", COGL_DEBUG_DISABLE_ARBFP},
{ "disable-fixed", COGL_DEBUG_DISABLE_FIXED},
diff --git a/clutter/cogl/cogl/cogl-debug.h b/clutter/cogl/cogl/cogl-debug.h
index 15de706..294de84 100644
--- a/clutter/cogl/cogl/cogl-debug.h
+++ b/clutter/cogl/cogl/cogl-debug.h
@@ -49,6 +49,7 @@ typedef enum {
COGL_DEBUG_ATLAS,
COGL_DEBUG_DUMP_ATLAS_IMAGE,
COGL_DEBUG_DISABLE_ATLAS,
+ COGL_DEBUG_DISABLE_SHARED_ATLAS,
COGL_DEBUG_OPENGL,
COGL_DEBUG_DISABLE_TEXTURING,
COGL_DEBUG_DISABLE_ARBFP,
diff --git a/clutter/cogl/pango/cogl-pango-glyph-cache.c b/clutter/cogl/pango/cogl-pango-glyph-cache.c
index 3c6ec5a..bbcfe8f 100644
--- a/clutter/cogl/pango/cogl-pango-glyph-cache.c
+++ b/clutter/cogl/pango/cogl-pango-glyph-cache.c
@@ -204,6 +204,9 @@ cogl_pango_glyph_cache_add_to_global_atlas (CoglPangoGlyphCache *cache,
{
CoglHandle texture;
+ if (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_SHARED_ATLAS))
+ return FALSE;
+
/* If the cache is using mipmapping then we can't use the global
atlas because it would just get migrated back out */
if (cache->use_mipmapping)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]