summaryrefslogtreecommitdiff
path: root/cogl/cogl-buffer-private.h
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2010-10-26 16:06:46 +0100
committerRobert Bragg <robert@linux.intel.com>2010-10-26 16:16:29 +0100
commite18bfd92e4985fb69692916741334dc2209ef85b (patch)
tree55959b303977b23e7c51ac0ac8de2e8f8921a92a /cogl/cogl-buffer-private.h
parent071253c48be87926a942d6e1d5d0f6289220f9b5 (diff)
downloadcogl-e18bfd92e4985fb69692916741334dc2209ef85b.tar.gz
buffer: Add a store_created bit field member
This adds a store_created bit field to CoglBuffer so we know if the underlying buffer has been allocated yet. Previously the code was trying to do something really wrong by accidentally using the COGL_PIXEL_ARRAY_FLAG_IS_SET macro (note "PIXEL_ARRAY") and what is more odd was the declaration of a CoglPixelArray *pixel_array in cogl-buffer.c which the buffer was being cast too before calling using the macro. Probably this was the fall-out of some previous code re-factoring.
Diffstat (limited to 'cogl/cogl-buffer-private.h')
-rw-r--r--cogl/cogl-buffer-private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cogl/cogl-buffer-private.h b/cogl/cogl-buffer-private.h
index 46dff720..a4b6e89b 100644
--- a/cogl/cogl-buffer-private.h
+++ b/cogl/cogl-buffer-private.h
@@ -93,6 +93,8 @@ struct _CoglBuffer
* the CoglBuffer is a VBO, PBO, ... or
* points to allocated memory in the
* fallback paths */
+
+ guint store_created:1;
};
/* This is used to register a type to the list of handle types that