[clutter/wip/pango-share-atlas: 13/13] 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: 13/13] cogl-debug: Add an option to disable atlasing sharing
- Date: Wed, 30 Mar 2011 16:05:48 +0000 (UTC)
commit 58ea487212b2cecbc6af042484a743bff94c7c63
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 73e88a7..d2a86ac 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 0cd039f..d46fd39 100644
--- a/clutter/cogl/cogl/cogl-debug.h
+++ b/clutter/cogl/cogl/cogl-debug.h
@@ -48,6 +48,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 b4be4f6..2e319b8 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]