summaryrefslogtreecommitdiff
path: root/cogl/cogl-context-private.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-11-25 16:11:36 +0000
committerNeil Roberts <neil@linux.intel.com>2013-11-28 18:12:22 +0000
commitc5644723f880e459ffef7002c40a1f01c85a0efb (patch)
tree419e78634e408515d2db17b80c8c56842cd6b7a3 /cogl/cogl-context-private.h
parent31a9726506668184e0a3b0044cf74a08fe219c0e (diff)
downloadcogl-c5644723f880e459ffef7002c40a1f01c85a0efb.tar.gz
Use COGL_FLAGS_* for the context's private feature flags
Previously the private feature flags were stored in an enum and we already had 31 flags. Adding the 32nd flag would presumably make it add -2³¹ as one of the values which might cause problems. To avoid this we'll just use an fixed-size array of longs and use indices for the enum values like we do for the public features. A slight complication with this is in the CoglDriverDescription where we were previously using a static intialised value to describe the set of features that the driver supports. We can't easily do this with the flags array so instead the features are stored in a fixed-size array of indices. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit d94cb984e3c93630f3c2e6e3be9d189672aa20f3) Conflicts: cogl/cogl-context-private.h cogl/cogl-context.c cogl/cogl-private.h cogl/cogl-renderer.c cogl/driver/gl/cogl-pipeline-opengl.c cogl/driver/gl/gl/cogl-driver-gl.c cogl/driver/gl/gl/cogl-pipeline-progend-fixed-arbfp.c cogl/driver/gl/gles/cogl-driver-gles.c cogl/driver/nop/cogl-driver-nop.c
Diffstat (limited to 'cogl/cogl-context-private.h')
-rw-r--r--cogl/cogl-context-private.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cogl/cogl-context-private.h b/cogl/cogl-context-private.h
index 91a264a6..7f1b054c 100644
--- a/cogl/cogl-context-private.h
+++ b/cogl/cogl-context-private.h
@@ -54,6 +54,7 @@
#include "cogl-fence-private.h"
#include "cogl-poll-private.h"
#include "cogl-path/cogl-path-types.h"
+#include "cogl-private.h"
typedef struct
{
@@ -92,7 +93,8 @@ struct _CoglContext
/* Features cache */
unsigned long features[COGL_FLAGS_N_LONGS_FOR_SIZE (_COGL_N_FEATURE_IDS)];
CoglFeatureFlags feature_flags; /* legacy/deprecated feature flags */
- CoglPrivateFeatureFlags private_feature_flags;
+ unsigned long private_features
+ [COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_N_PRIVATE_FEATURES)];
CoglBool needs_viewport_scissor_workaround;
CoglFramebuffer *viewport_scissor_workaround_framebuffer;