pub struct CounterSampleBuffer(/* private fields */);Expand description
A buffer that stores GPU counter samples.
C++ equivalent: MTL::CounterSampleBuffer
Counter sample buffers are created from a device using a descriptor. They store sampled counter values that can be resolved to get the results.
Implementations§
Source§impl CounterSampleBuffer
impl CounterSampleBuffer
Sourcepub fn device(&self) -> Device
pub fn device(&self) -> Device
Get the device that created this buffer.
C++ equivalent: Device* device() const
Sourcepub fn label(&self) -> Option<String>
pub fn label(&self) -> Option<String>
Get the label for this buffer.
C++ equivalent: NS::String* label() const
Sourcepub fn sample_count(&self) -> UInteger
pub fn sample_count(&self) -> UInteger
Get the number of samples in this buffer.
C++ equivalent: NS::UInteger sampleCount() const
Sourcepub fn resolve_counter_range_raw(
&self,
location: UInteger,
length: UInteger,
) -> Result<*mut c_void, CounterSampleBufferError>
pub fn resolve_counter_range_raw( &self, location: UInteger, length: UInteger, ) -> Result<*mut c_void, CounterSampleBufferError>
Resolve counter values for a range of samples.
Returns the raw NSData pointer containing the resolved counter values. The data format depends on the counter set used.
C++ equivalent: NS::Data* resolveCounterRange(NS::Range)
Trait Implementations§
Source§impl Clone for CounterSampleBuffer
impl Clone for CounterSampleBuffer
Source§impl Debug for CounterSampleBuffer
impl Debug for CounterSampleBuffer
Source§impl Drop for CounterSampleBuffer
impl Drop for CounterSampleBuffer
Source§impl Referencing for CounterSampleBuffer
impl Referencing for CounterSampleBuffer
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> usize
fn retain_count(&self) -> usize
Get the retain count of the object. Read more
impl Send for CounterSampleBuffer
impl Sync for CounterSampleBuffer
Auto Trait Implementations§
impl Freeze for CounterSampleBuffer
impl RefUnwindSafe for CounterSampleBuffer
impl Unpin for CounterSampleBuffer
impl UnwindSafe for CounterSampleBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more