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.
This commit is contained in:
Neil Roberts 2011-03-30 16:39:38 +01:00 committed by Robert Bragg
parent 184527580e
commit 14ed963b05
4 changed files with 11 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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