|
@@ -283,6 +283,31 @@ GeomVertexArrayDataHandle(CPT(GeomVertexArrayData) object,
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ *
|
|
|
|
|
+ */
|
|
|
|
|
+INLINE GeomVertexArrayDataHandle::
|
|
|
|
|
+GeomVertexArrayDataHandle(const GeomVertexArrayData *object,
|
|
|
|
|
+ Thread *current_thread) :
|
|
|
|
|
+ _object((GeomVertexArrayData *)object),
|
|
|
|
|
+ _current_thread(current_thread),
|
|
|
|
|
+ _cdata((GeomVertexArrayData::CData *)object->_cycler.read_unlocked(current_thread)),
|
|
|
|
|
+ _writable(false)
|
|
|
|
|
+{
|
|
|
|
|
+#ifdef _DEBUG
|
|
|
|
|
+ nassertv(_object->test_ref_count_nonzero());
|
|
|
|
|
+#endif // _DEBUG
|
|
|
|
|
+#ifdef DO_PIPELINING
|
|
|
|
|
+ _cdata->ref();
|
|
|
|
|
+#endif // DO_PIPELINING
|
|
|
|
|
+ // We must grab the lock *after* we have incremented the reference count,
|
|
|
|
|
+ // above.
|
|
|
|
|
+ _cdata->_rw_lock.acquire();
|
|
|
|
|
+#ifdef DO_MEMORY_USAGE
|
|
|
|
|
+ MemoryUsage::update_type(this, get_class_type());
|
|
|
|
|
+#endif
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
@@ -309,6 +334,31 @@ GeomVertexArrayDataHandle(PT(GeomVertexArrayData) object,
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ *
|
|
|
|
|
+ */
|
|
|
|
|
+INLINE GeomVertexArrayDataHandle::
|
|
|
|
|
+GeomVertexArrayDataHandle(GeomVertexArrayData *object,
|
|
|
|
|
+ Thread *current_thread) :
|
|
|
|
|
+ _object(object),
|
|
|
|
|
+ _current_thread(current_thread),
|
|
|
|
|
+ _cdata(object->_cycler.write_upstream(true, current_thread)),
|
|
|
|
|
+ _writable(true)
|
|
|
|
|
+{
|
|
|
|
|
+#ifdef _DEBUG
|
|
|
|
|
+ nassertv(_object->test_ref_count_nonzero());
|
|
|
|
|
+#endif // _DEBUG
|
|
|
|
|
+#ifdef DO_PIPELINING
|
|
|
|
|
+ _cdata->ref();
|
|
|
|
|
+#endif // DO_PIPELINING
|
|
|
|
|
+ // We must grab the lock *after* we have incremented the reference count,
|
|
|
|
|
+ // above.
|
|
|
|
|
+ _cdata->_rw_lock.acquire();
|
|
|
|
|
+#ifdef DO_MEMORY_USAGE
|
|
|
|
|
+ MemoryUsage::update_type(this, get_class_type());
|
|
|
|
|
+#endif
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Don't attempt to copy these objects.
|
|
* Don't attempt to copy these objects.
|
|
|
*/
|
|
*/
|