GrRecordingContext

class GrRecordingContext

Methods

__init__

abandoned

Reports whether the GrDirectContext associated with this GrRecordingContext is abandoned.

asDirectContext

Safely downcast to a GrDirectContext.

backend

The 3D API backing this context.

colorTypeSupportedAsImage

Can a Image be created with the given color type.

colorTypeSupportedAsSurface

Can a Surface be created with the given color type.

defaultBackendFormat

Retrieve the default GrBackendFormat for a given ColorType and renderability.

maxRenderTargetSize

Gets the maximum supported render target size.

maxSurfaceSampleCountForColorType

Gets the maximum supported sample count for a color type.

maxTextureSize

Gets the maximum supported texture size.

ref

Increment the reference count.

threadSafeProxy

unique

May return true if the caller is the only owner.

unref

Decrement the reference count.

Methods

GrRecordingContext.__init__(*args, **kwargs)
GrRecordingContext.abandoned(self: skia.GrRecordingContext) bool

Reports whether the GrDirectContext associated with this GrRecordingContext is abandoned.

When called on a GrDirectContext it may actively check whether the underlying 3D API device/context has been disconnected before reporting the status. If so, calling this method will transition the GrDirectContext to the abandoned state.

GrRecordingContext.asDirectContext(self: skia.GrContext_Base) GrDirectContext

Safely downcast to a GrDirectContext.

GrRecordingContext.backend(self: skia.GrContext_Base) skia.GrBackendApi

The 3D API backing this context.

GrRecordingContext.colorTypeSupportedAsImage(self: skia.GrRecordingContext, arg0: SkColorType) bool

Can a Image be created with the given color type.

GrRecordingContext.colorTypeSupportedAsSurface(self: skia.GrRecordingContext, colorType: SkColorType) bool

Can a Surface be created with the given color type. To check whether MSAA is supported use maxSurfaceSampleCountForColorType().

GrRecordingContext.defaultBackendFormat(self: skia.GrRecordingContext, colorType: SkColorType, renderable: skia.GrRenderable = <GrRenderable.kNo: 0>) skia.GrBackendFormat

Retrieve the default GrBackendFormat for a given ColorType and renderability.

It is guaranteed that this backend format will be the one used by the following ColorType and SurfaceCharacterization-based createBackendTexture() methods.

The caller should check that the returned format is valid.

GrRecordingContext.maxRenderTargetSize(self: skia.GrRecordingContext) int

Gets the maximum supported render target size.

GrRecordingContext.maxSurfaceSampleCountForColorType(self: skia.GrRecordingContext, arg0: SkColorType) int

Gets the maximum supported sample count for a color type.

1 is returned if only non-MSAA rendering is supported for the color type. 0 is returned if rendering to this color type is not supported at all.

GrRecordingContext.maxTextureSize(self: skia.GrRecordingContext) int

Gets the maximum supported texture size.

GrRecordingContext.ref(self: skia.RefCntBase) None

Increment the reference count.

Must be balanced by a call to unref().

GrRecordingContext.threadSafeProxy(self: skia.GrContext_Base) GrContextThreadSafeProxy
GrRecordingContext.unique(self: skia.RefCntBase) bool

May return true if the caller is the only owner.

Ensures that all previous owner’s actions are complete.

GrRecordingContext.unref(self: skia.RefCntBase) None

Decrement the reference count.

If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.