pub type DirectContext = RCHandle<GrDirectContext>;

Aliased Type§

struct DirectContext(/* private fields */);

Implementations§

§

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<N> AsRef<RCHandle<N>> for RCHandle<N>where N: NativeRefCounted,

§

fn as_ref(&self) -> &RCHandle<N>

Converts this type into a shared reference of the (usually inferred) input type.
§

impl<N> Clone for RCHandle<N>where N: NativeRefCounted,

§

fn clone(&self) -> RCHandle<N>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

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.

§

fn can_send(&self) -> bool

Returns true if the handle can be sent to another thread.
§

fn wrap_send(self) -> Result<Sendable<RCHandle<H>>, RCHandle<H>>

Wrap the handle in a type that can be sent to another thread and unwrapped there. Read more
§

impl Debug for RCHandle<GrDirectContext>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for RCHandle<GrDirectContext>

§

type Target = RCHandle<GrRecordingContext>

The resulting type after dereferencing.
§

fn deref(&self) -> &<RCHandle<GrDirectContext> as Deref>::Target

Dereferences the value.
§

impl DerefMut for RCHandle<GrDirectContext>

§

fn deref_mut(&mut self) -> &mut <RCHandle<GrDirectContext> as Deref>::Target

Mutably dereferences the value.
§

impl<N> Drop for RCHandle<N>where N: NativeRefCounted,

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl<N> Flattenable for RCHandle<N>where N: NativeFlattenable + NativeRefCountedBase,

§

fn type_name(&self) -> &CStr

§

fn serialize(&self) -> RCHandle<SkData>

§

fn deserialize(data: &[u8]) -> Option<RCHandle<N>>

§

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.

§

fn from(rch: &RCHandle<N>) -> RCHandle<N>

Converts to this type from the input type.
§

impl<N> PartialEq<RCHandle<N>> for RCHandle<N>where N: NativeRefCounted + NativePartialEq,

§

fn eq(&self, rhs: &RCHandle<N>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<N> PointerWrapper<N> for RCHandle<N>where N: NativeRefCounted,

§

fn wrap(ptr: *mut N) -> Option<RCHandle<N>>

Wraps a native pointer into a wrapper type. Returns None if the pointer is null.
§

fn unwrap(self) -> *mut N

Unwraps the wrapper type into the native pointer.
§

fn inner(&self) -> &N

Access the wrapped pointer.
§

fn inner_mut(&mut self) -> &mut N

Access the wrapped pointer.