[debug] Adds a COGL_DEBUG=force-scanline-paths

For a long time now the GLES driver for Cogl has supported a fallback
scanline rasterizer for filling paths when no stencil buffer is available,
but now that we build the same cogl-primitives code for GL and GLES I
thought it may sometimes be useful for debugging to force Cogl to use the
scanline rasterizer instead of the current stencil buffer approach.
This commit is contained in:
Robert Bragg 2009-11-04 16:55:18 +00:00
parent 0b4899ef23
commit 864e12df05
3 changed files with 6 additions and 3 deletions

View File

@ -47,7 +47,8 @@ static const GDebugKey cogl_debug_keys[] = {
{ "journal", COGL_DEBUG_JOURNAL },
{ "batching", COGL_DEBUG_BATCHING },
{ "disable-software-transform", COGL_DEBUG_DISABLE_SOFTWARE_TRANSFORM },
{ "matrices", COGL_DEBUG_MATRICES }
{ "matrices", COGL_DEBUG_MATRICES },
{ "force-scanline-paths", COGL_DEBUG_FORCE_SCANLINE_PATHS }
};
static const gint n_cogl_debug_keys = G_N_ELEMENTS (cogl_debug_keys);

View File

@ -45,7 +45,8 @@ typedef enum {
COGL_DEBUG_JOURNAL = 1 << 13,
COGL_DEBUG_BATCHING = 1 << 14,
COGL_DEBUG_DISABLE_SOFTWARE_TRANSFORM = 1 << 15,
COGL_DEBUG_MATRICES = 1 << 16
COGL_DEBUG_MATRICES = 1 << 16,
COGL_DEBUG_FORCE_SCANLINE_PATHS = 1 << 17
} CoglDebugFlags;
#ifdef COGL_ENABLE_DEBUG

View File

@ -1452,7 +1452,8 @@ _cogl_path_fill_nodes (void)
_cogl_path_get_bounds (ctx->path_nodes_min, ctx->path_nodes_max,
&bounds_x, &bounds_y, &bounds_w, &bounds_h);
if (cogl_features_available (COGL_FEATURE_STENCIL_BUFFER))
if (G_LIKELY (!(cogl_debug_flags & COGL_DEBUG_FORCE_SCANLINE_PATHS)) &&
cogl_features_available (COGL_FEATURE_STENCIL_BUFFER))
{
CoglHandle draw_buffer;
CoglClipStackState *clip_state;