Type Alias freya_engine::prelude::DirectContext
pub type DirectContext = RCHandle<GrDirectContext>;
Aliased Type§
struct DirectContext(/* private fields */);
Implementations
§impl RCHandle<GrDirectContext>
impl RCHandle<GrDirectContext>
pub fn new_gl<'a>( interface: impl Into<RCHandle<GrGLInterface>>, options: impl Into<Option<&'a ContextOptions>>, ) -> Option<RCHandle<GrDirectContext>>
👎Deprecated since 0.74.0: use gpu::direct_contexts::make_gl()
pub fn reset( &mut self, backend_state: Option<u32>, ) -> &mut RCHandle<GrDirectContext>
pub fn reset_gl_texture_bindings(&mut self) -> &mut RCHandle<GrDirectContext>
pub fn abandon(&mut self) -> &mut RCHandle<GrDirectContext>
pub fn is_device_lost(&mut self) -> bool
pub fn oomed(&mut self) -> bool
pub fn release_resources_and_abandon( &mut self, ) -> &mut RCHandle<GrDirectContext>
pub fn resource_cache_limit(&self) -> usize
pub fn resource_cache_usage(&self) -> ResourceCacheUsage
pub fn resource_cache_purgeable_bytes(&self) -> usize
pub fn set_resource_cache_limits(&mut self, limits: ResourceCacheLimits)
pub fn set_resource_cache_limit(&mut self, max_resource_bytes: usize)
pub fn free_gpu_resources(&mut self) -> &mut RCHandle<GrDirectContext>
pub fn perform_deferred_cleanup( &mut self, not_used: Duration, opts: impl Into<Option<GrPurgeResourceOptions>>, ) -> &mut RCHandle<GrDirectContext>
pub fn purge_unlocked_resource_bytes( &mut self, bytes_to_purge: usize, prefer_scratch_resources: bool, ) -> &mut RCHandle<GrDirectContext>
pub fn purge_unlocked_resources( &mut self, opts: GrPurgeResourceOptions, ) -> &mut RCHandle<GrDirectContext>
pub fn flush_and_submit(&mut self) -> &mut RCHandle<GrDirectContext>
pub fn flush_submit_and_sync_cpu(&mut self) -> &mut RCHandle<GrDirectContext>
pub fn flush_with_info(&mut self, info: &FlushInfo) -> GrSemaphoresSubmitted
👎Deprecated since 0.37.0: Use flush()
pub fn flush<'a>( &mut self, info: impl Into<Option<&'a FlushInfo>>, ) -> GrSemaphoresSubmitted
pub fn flush_image_with_info( &mut self, image: &RCHandle<SkImage>, info: &FlushInfo, ) -> GrSemaphoresSubmitted
pub fn flush_image(&mut self, image: &RCHandle<SkImage>)
pub fn flush_and_submit_image(&mut self, image: &RCHandle<SkImage>)
pub fn flush_surface_with_access( &mut self, surface: &mut RCHandle<SkSurface>, access: SkSurfaces_BackendSurfaceAccess, info: &FlushInfo, ) -> GrSemaphoresSubmitted
pub fn flush_surface_with_texture_state( &mut self, surface: &mut RCHandle<SkSurface>, info: &FlushInfo, new_state: Option<&RCHandle<skgpu_MutableTextureState>>, ) -> GrSemaphoresSubmitted
pub fn flush_and_submit_surface( &mut self, surface: &mut RCHandle<SkSurface>, sync_cpu: impl Into<Option<GrSyncCpu>>, )
pub fn flush_surface(&mut self, surface: &mut RCHandle<SkSurface>)
pub fn submit(&mut self, submit_info: impl Into<SubmitInfo>) -> bool
pub fn check_async_work_completion(&mut self)
pub fn supports_distance_field_text(&self) -> bool
pub fn compressed_backend_format( &self, compression: SkTextureCompressionType, ) -> Handle<GrBackendFormat>
pub fn set_backend_texture_state( &mut self, backend_texture: &RefHandle<GrBackendTexture>, state: &RCHandle<skgpu_MutableTextureState>, ) -> bool
pub fn set_backend_texture_state_and_return_previous( &mut self, backend_texture: &RefHandle<GrBackendTexture>, state: &RCHandle<skgpu_MutableTextureState>, ) -> Option<RCHandle<skgpu_MutableTextureState>>
pub fn set_backend_render_target_state( &mut self, target: &Handle<GrBackendRenderTarget>, state: &RCHandle<skgpu_MutableTextureState>, ) -> bool
pub fn set_backend_render_target_state_and_return_previous( &mut self, target: &Handle<GrBackendRenderTarget>, state: &RCHandle<skgpu_MutableTextureState>, ) -> Option<RCHandle<skgpu_MutableTextureState>>
pub fn delete_backend_texture(&mut self, texture: &RefHandle<GrBackendTexture>)
pub fn precompile_shader( &mut self, key: &RCHandle<SkData>, data: &RCHandle<SkData>, ) -> bool
pub fn id(&self) -> DirectContextId
§impl<T> RCHandle<T>where
T: NativeRefCounted + NodeSubtype,
impl<T> RCHandle<T>where
T: NativeRefCounted + NodeSubtype,
pub fn as_base(&self) -> &RCHandle<<T as NodeSubtype>::Base>
pub fn as_base_mut(&mut self) -> &mut RCHandle<<T as NodeSubtype>::Base>
Trait Implementations
§impl<H> ConditionallySend for RCHandle<H>where
H: NativeRefCountedBase,
impl<H> ConditionallySend for RCHandle<H>where
H: NativeRefCountedBase,
RCHandle<H>
is conditionally Send and can be sent to
another thread when its reference count is 1.
§impl<N> Debug for RCHandle<N>where
N: NativeRefCounted,
RCHandle<N>: DebugAttributes,
impl<N> Debug for RCHandle<N>where
N: NativeRefCounted,
RCHandle<N>: DebugAttributes,
§impl<T> Deref for RCHandle<T>where
T: NativeRefCounted + NodeSubtype,
impl<T> Deref for RCHandle<T>where
T: NativeRefCounted + NodeSubtype,
§impl<T> DerefMut for RCHandle<T>where
T: NativeRefCounted + NodeSubtype,
impl<T> DerefMut for RCHandle<T>where
T: NativeRefCounted + NodeSubtype,
This implementation of DerefMut
causes subsequent UB when the containing
[RCHandle
] gets overwritten by a base type that does not match the actual
underlying type.
§impl<N> Flattenable for RCHandle<N>where
N: NativeFlattenable + NativeRefCountedBase,
impl<N> Flattenable for RCHandle<N>where
N: NativeFlattenable + NativeRefCountedBase,
§impl<N> From<&RCHandle<N>> for RCHandle<N>where
N: NativeRefCounted,
impl<N> From<&RCHandle<N>> for RCHandle<N>where
N: NativeRefCounted,
A reference counted handle is cheap to clone, so we do support a conversion from a reference to a ref counter to an owned handle.