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<Option<RCHandle<GrGLInterface>>>, options: impl Into<Option<&'a ContextOptions>> ) -> Option<RCHandle<GrDirectContext>>
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 oomed(&mut self) -> bool
pub fn release_resources_and_abandon( &mut self ) -> &mut RCHandle<GrDirectContext>
pub fn resource_cache_limits(&self) -> ResourceCacheLimits
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, scratch_resources_only: impl Into<Option<bool>> ) -> &mut RCHandle<GrDirectContext>
pub fn purge_unlocked_resources( &mut self, bytes_to_purge: Option<usize>, prefer_scratch_resources: bool ) -> &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<&Handle<skgpu_MutableTextureState>> ) -> GrSemaphoresSubmitted
pub fn flush_and_submit_surface( &mut self, surface: &mut RCHandle<SkSurface>, sync_cpu: impl Into<Option<bool>> )
pub fn flush_surface(&mut self, surface: &mut RCHandle<SkSurface>)
pub fn submit(&mut self, sync_cpu: impl Into<Option<bool>>) -> 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: &Handle<skgpu_MutableTextureState> ) -> bool
pub fn set_backend_texture_state_and_return_previous( &mut self, backend_texture: &RefHandle<GrBackendTexture>, state: &Handle<skgpu_MutableTextureState> ) -> Option<Handle<skgpu_MutableTextureState>>
pub fn set_backend_render_target_state( &mut self, target: &Handle<GrBackendRenderTarget>, state: &Handle<skgpu_MutableTextureState> ) -> bool
pub fn set_backend_render_target_state_and_return_previous( &mut self, target: &Handle<GrBackendRenderTarget>, state: &Handle<skgpu_MutableTextureState> ) -> Option<Handle<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
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> 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.