GrRecordingContext
- class GrRecordingContext
Methods
abandoned(self: skia.GrRecordingContext) -> bool
asDirectContext(self: skia.GrContext_Base) -> GrDirectContext
backend(self: skia.GrContext_Base) -> skia.GrBackendApi
colorTypeSupportedAsImage(self: skia.GrRecordingContext, arg0: SkColorType) -> bool
colorTypeSupportedAsSurface(self: skia.GrRecordingContext, colorType: SkColorType) -> bool
compressedBackendFormat(self: skia.GrContext_Base, arg0: SkTextureCompressionType) -> skia.GrBackendFormat
defaultBackendFormat(self: skia.GrRecordingContext, colorType: SkColorType, renderable: skia.GrRenderable = skia.GrRenderable.kNo) -> skia.GrBackendFormat
maxRenderTargetSize(self: skia.GrRecordingContext) -> int
maxSurfaceSampleCountForColorType(self: skia.GrRecordingContext, arg0: SkColorType) -> int
maxTextureSize(self: skia.GrRecordingContext) -> int
ref(self: skia.RefCntBase) -> None
threadSafeProxy(self: skia.GrContext_Base) -> GrContextThreadSafeProxy
unique(self: skia.RefCntBase) -> bool
unref(self: skia.RefCntBase) -> None
Methods
- GrRecordingContext.__init__(*args, **kwargs)
- GrRecordingContext.abandoned(self: skia.GrRecordingContext) bool
Reports whether the
GrDirectContextassociated with thisGrRecordingContextis abandoned.When called on a
GrDirectContextit may actively check whether the underlying 3D API device/context has been disconnected before reporting the status. If so, calling this method will transition theGrDirectContextto 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
Imagebe created with the given color type.
- GrRecordingContext.colorTypeSupportedAsSurface(self: skia.GrRecordingContext, colorType: SkColorType) bool
Can a
Surfacebe 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
GrBackendFormatfor a givenColorTypeand renderability.It is guaranteed that this backend format will be the one used by the following
ColorTypeand 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.