GrRecordingContext
- class GrRecordingContext
Methods
Reports whether the
GrDirectContext
associated with thisGrRecordingContext
is abandoned.Safely downcast to a
GrDirectContext
.The 3D API backing this context.
Can a
Image
be created with the given color type.Can a
Surface
be created with the given color type.Retrieve the default
GrBackendFormat
for a givenColorType
and renderability.Gets the maximum supported render target size.
Gets the maximum supported sample count for a color type.
Gets the maximum supported texture size.
Increment the reference count.
May return true if the caller is the only owner.
Decrement the reference count.
Methods
- GrRecordingContext.__init__(*args, **kwargs)
- GrRecordingContext.abandoned(self: skia.GrRecordingContext) bool
Reports whether the
GrDirectContext
associated with thisGrRecordingContext
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 theGrDirectContext
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 usemaxSurfaceSampleCountForColorType()
.
- GrRecordingContext.compressedBackendFormat(self: skia.GrContext_Base, arg0: SkTextureCompressionType) skia.GrBackendFormat
- GrRecordingContext.defaultBackendFormat(self: skia.GrRecordingContext, colorType: SkColorType, renderable: skia.GrRenderable = skia.GrRenderable.kNo) skia.GrBackendFormat
Retrieve the default
GrBackendFormat
for a givenColorType
and renderability.It is guaranteed that this backend format will be the one used by the following
ColorType
and SurfaceCharacterization-basedcreateBackendTexture()
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.