g_return_val_if_fail (bmp_handle != COGL_INVALID_HANDLE, COGL_INVALID_HANDLE);
+ /* Don't put textures in the atlas if the user has explicitly
+ requested to disable it */
+ if (G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_DISABLE_ATLAS))
+ return COGL_INVALID_HANDLE;
+
/* We can't put the texture in the atlas if there are any special
flags. This precludes textures with COGL_TEXTURE_NO_ATLAS and
COGL_TEXTURE_NO_SLICING from being atlased */
{ "matrices", COGL_DEBUG_MATRICES },
{ "force-scanline-paths", COGL_DEBUG_FORCE_SCANLINE_PATHS },
{ "atlas", COGL_DEBUG_ATLAS },
- { "dump-atlas-image", COGL_DEBUG_DUMP_ATLAS_IMAGE }
+ { "dump-atlas-image", COGL_DEBUG_DUMP_ATLAS_IMAGE },
+ { "disable-atlas", COGL_DEBUG_DISABLE_ATLAS }
};
static const gint n_cogl_debug_keys = G_N_ELEMENTS (cogl_debug_keys);
COGL_DEBUG_MATRICES = 1 << 15,
COGL_DEBUG_FORCE_SCANLINE_PATHS = 1 << 16,
COGL_DEBUG_ATLAS = 1 << 17,
- COGL_DEBUG_DUMP_ATLAS_IMAGE = 1 << 18
+ COGL_DEBUG_DUMP_ATLAS_IMAGE = 1 << 18,
+ COGL_DEBUG_DISABLE_ATLAS = 1 << 19
} CoglDebugFlags;
#ifdef COGL_ENABLE_DEBUG