summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/arrayobj.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-06-26 14:47:19 -0600
committerBrian Paul <[email protected]>2012-06-27 07:50:57 -0600
commit8459f4a63aec97847b0e3957ffb82beff94035fa (patch)
treed3bdc54df9630fe0a6a451e9818a53bacab2e94a /src/mesa/main/arrayobj.h
parentdcf1dafa9ec93f9300ecffe5bddfd2b131bc218f (diff)
mesa: make _mesa_reference_array_object() an inline function
As we do for texture objects, buffer objects, etc.
Diffstat (limited to 'src/mesa/main/arrayobj.h')
-rw-r--r--src/mesa/main/arrayobj.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
index 717c7916e3a..e5270fa2cec 100644
--- a/src/mesa/main/arrayobj.h
+++ b/src/mesa/main/arrayobj.h
@@ -52,9 +52,19 @@ extern void
_mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj );
extern void
+_mesa_reference_array_object_(struct gl_context *ctx,
+ struct gl_array_object **ptr,
+ struct gl_array_object *arrayObj);
+
+static inline void
_mesa_reference_array_object(struct gl_context *ctx,
struct gl_array_object **ptr,
- struct gl_array_object *arrayObj);
+ struct gl_array_object *arrayObj)
+{
+ if (*ptr != arrayObj)
+ _mesa_reference_array_object_(ctx, ptr, arrayObj);
+}
+
extern void
_mesa_initialize_array_object( struct gl_context *ctx,