mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
make COGL_FEATURE_STENCIL_BUFFER private
Although we have to leave the COGL_FEATURE_STENCIL_BUFFER enum as part of the public api we no longer ever set this feature flag. Cogl doesn't currently expose the concept of a stencil buffer in the public api (we only indirectly expose it via the clip stack api) so it doesn't make much sense to have a stencil buffer feature flag. We now have a COGL_PRIVATE_FEATURE_STENCIL_BUFFER flag instead which we can check when we need to use the buffer for clipping. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
6da3bff9b9
commit
b566170836
@ -128,7 +128,8 @@ typedef enum
|
|||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE = 1L<<0,
|
COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE = 1L<<0,
|
||||||
COGL_PRIVATE_FEATURE_MESA_PACK_INVERT = 1L<<1
|
COGL_PRIVATE_FEATURE_MESA_PACK_INVERT = 1L<<1,
|
||||||
|
COGL_PRIVATE_FEATURE_STENCIL_BUFFER = 1L<<2
|
||||||
} CoglPrivateFeatureFlags;
|
} CoglPrivateFeatureFlags;
|
||||||
|
|
||||||
/* Sometimes when evaluating pipelines, either during comparisons or
|
/* Sometimes when evaluating pipelines, either during comparisons or
|
||||||
|
@ -273,7 +273,7 @@ _cogl_path_fill_nodes_with_clipped_rectangle (CoglPath *path)
|
|||||||
{
|
{
|
||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||||
|
|
||||||
if (!cogl_features_available (COGL_FEATURE_STENCIL_BUFFER))
|
if (!(ctx->private_feature_flags & COGL_PRIVATE_FEATURE_STENCIL_BUFFER))
|
||||||
{
|
{
|
||||||
static gboolean seen_warning = FALSE;
|
static gboolean seen_warning = FALSE;
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ _cogl_gl_update_features (CoglContext *context,
|
|||||||
GE( ctx, glGetIntegerv (GL_STENCIL_BITS, &num_stencil_bits) );
|
GE( ctx, glGetIntegerv (GL_STENCIL_BITS, &num_stencil_bits) );
|
||||||
/* We need at least three stencil bits to combine clips */
|
/* We need at least three stencil bits to combine clips */
|
||||||
if (num_stencil_bits > 2)
|
if (num_stencil_bits > 2)
|
||||||
flags |= COGL_FEATURE_STENCIL_BUFFER;
|
private_flags |= COGL_PRIVATE_FEATURE_STENCIL_BUFFER;
|
||||||
|
|
||||||
GE( ctx, glGetIntegerv (GL_MAX_CLIP_PLANES, &max_clip_planes) );
|
GE( ctx, glGetIntegerv (GL_MAX_CLIP_PLANES, &max_clip_planes) );
|
||||||
if (max_clip_planes >= 4)
|
if (max_clip_planes >= 4)
|
||||||
|
@ -70,7 +70,7 @@ _cogl_gles_update_features (CoglContext *context,
|
|||||||
GE( context, glGetIntegerv (GL_STENCIL_BITS, &num_stencil_bits) );
|
GE( context, glGetIntegerv (GL_STENCIL_BITS, &num_stencil_bits) );
|
||||||
/* We need at least three stencil bits to combine clips */
|
/* We need at least three stencil bits to combine clips */
|
||||||
if (num_stencil_bits > 2)
|
if (num_stencil_bits > 2)
|
||||||
flags |= COGL_FEATURE_STENCIL_BUFFER;
|
private_flags |= COGL_PRIVATE_FEATURE_STENCIL_BUFFER;
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GLES
|
#ifdef HAVE_COGL_GLES
|
||||||
if (context->driver == COGL_DRIVER_GLES1)
|
if (context->driver == COGL_DRIVER_GLES1)
|
||||||
|
Loading…
Reference in New Issue
Block a user