pub struct GLProcessorThreaded { /* private fields */ }Expand description
OpenGL multi-threaded image converter. The actual conversion is done in a
separate rendering thread, as OpenGL contexts are not thread-safe. This can
be safely sent between threads. The convert() call sends the conversion
request to the rendering thread and waits for the result.
Implementations§
Source§impl GLProcessorThreaded
impl GLProcessorThreaded
Sourcepub fn set_colorimetry_mode(
&mut self,
mode: ColorimetryMode,
) -> Result<(), Error>
pub fn set_colorimetry_mode( &mut self, mode: ColorimetryMode, ) -> Result<(), Error>
Sets the colorimetry/performance trade-off (see
crate::ColorimetryMode). The EDGEFIRST_COLORIMETRY environment
variable takes precedence — when set, this call logs and keeps the
env-selected mode.
Sourcepub fn set_int8_interpolation_mode(
&mut self,
mode: Int8InterpolationMode,
) -> Result<(), Error>
pub fn set_int8_interpolation_mode( &mut self, mode: Int8InterpolationMode, ) -> Result<(), Error>
Sets the interpolation mode for int8 proto textures.
Sourcepub fn egl_cache_stats(&self) -> Result<GlCacheStats, Error>
pub fn egl_cache_stats(&self) -> Result<GlCacheStats, Error>
Snapshot the EGLImage cache counters (src, dst, NV R8) from the GL
thread. Steady-state tests capture this after warmup and after an
N-frame loop over a fixed buffer pool and assert
total_misses stays flat —
any increase means a convert re-imported a buffer it should have found
cached (the cache-behavior equality gate for GL refactors).
Sourcepub fn create_pbo_image(
&self,
width: usize,
height: usize,
format: PixelFormat,
) -> Result<Tensor<u8>, Error>
pub fn create_pbo_image( &self, width: usize, height: usize, format: PixelFormat, ) -> Result<Tensor<u8>, Error>
Create a PBO-backed [Tensor<u8>] image on the GL thread.
Trait Implementations§
Source§impl Debug for GLProcessorThreaded
impl Debug for GLProcessorThreaded
Source§impl Drop for GLProcessorThreaded
impl Drop for GLProcessorThreaded
Source§impl ImageProcessorTrait for GLProcessorThreaded
impl ImageProcessorTrait for GLProcessorThreaded
Source§fn convert(
&mut self,
src: &TensorDyn,
dst: &mut TensorDyn,
rotation: Rotation,
flip: Flip,
crop: Crop,
) -> Result<()>
fn convert( &mut self, src: &TensorDyn, dst: &mut TensorDyn, rotation: Rotation, flip: Flip, crop: Crop, ) -> Result<()>
Source§fn convert_deferred(
&mut self,
src: &TensorDyn,
dst: &mut TensorDyn,
rotation: Rotation,
flip: Flip,
crop: Crop,
) -> Result<()>
fn convert_deferred( &mut self, src: &TensorDyn, dst: &mut TensorDyn, rotation: Rotation, flip: Flip, crop: Crop, ) -> Result<()>
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
convert_deferred
since the last flush, issuing a single GPU synchronization. Read moreSource§fn draw_decoded_masks(
&mut self,
dst: &mut TensorDyn,
detect: &[DetectBox],
segmentation: &[Segmentation],
overlay: MaskOverlay<'_>,
) -> Result<()>
fn draw_decoded_masks( &mut self, dst: &mut TensorDyn, detect: &[DetectBox], segmentation: &[Segmentation], overlay: MaskOverlay<'_>, ) -> Result<()>
dst. Read moreSource§fn draw_proto_masks(
&mut self,
dst: &mut TensorDyn,
detect: &[DetectBox],
proto_data: &ProtoData,
overlay: MaskOverlay<'_>,
) -> Result<()>
fn draw_proto_masks( &mut self, dst: &mut TensorDyn, detect: &[DetectBox], proto_data: &ProtoData, overlay: MaskOverlay<'_>, ) -> Result<()>
impl Send for GLProcessorThreaded
impl Sync for GLProcessorThreaded
Auto Trait Implementations§
impl !RefUnwindSafe for GLProcessorThreaded
impl !UnwindSafe for GLProcessorThreaded
impl Freeze for GLProcessorThreaded
impl Unpin for GLProcessorThreaded
impl UnsafeUnpin for GLProcessorThreaded
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more