AbstractCache key assigned by CoreTextureManager when this texture is stored
in the key cache. null when the texture is not cached.
ProtectedcontextReadonlyrenderableReadonlyrenderableMemory used by this texture in bytes
ProtectedtxChecks if the texture can be safely cleaned up. Considers the renderable state, startup grace period, and renderable owners.
Clear all listeners for the given event names by setting their array length to 0, WITHOUT deleting the keys. This keeps the eventListeners object in V8's fast-properties mode and avoids re-allocating the arrays on the next on() call. Use this for objects with a known fixed set of event names (e.g. CoreAnimation, CoreAnimationController).
Only writes arr.length = 0 when the array is non-empty -- skips the write (and the write barrier on old-gen objects) when already empty, which is the common case after unregisterAnimation() has removed all listeners.
Optionaldata: anyEmit to all listeners, isolating each one from the others.
Optionaldata: anyOptionalonError: LoopErrorHandlerUnlike emit, a throwing listener neither aborts the remaining
listeners nor propagates to the caller (e.g. the rAF loop). Each error is
routed to onError (handleLoopError) or console.error and iteration
continues. Internal renderer code should keep using emit (fail loudly);
app-facing boundaries should use this.
Kept as a separate method so the hot emit path — and more importantly
its callers in the frame loop — stay try-free for older JITs.
Get the texture data for this texture.
The texture data for this texture.
AbstractgetGet the texture source for this texture.
Check whether this emitter has any listeners registered.
Optionalevent: string
Optional event name. When provided, checks only that event. When omitted, checks all events.
true if at least one listener is registered.
Checks if the texture is within the startup grace period. During this period, textures are protected from cleanup to prevent race conditions during app initialization.
Load the core context texture for this Texture. The ctxTexture is created by the renderer and lives on the GPU.
Optionallistener: EventListenerOptionalonAdd/remove an owner to/from the Texture based on its renderability.
OptionalerrorOrDimensions: TextureError | DimensionsStaticmakeMake a cache key for this texture.
A cache key for this texture or false if the texture type does not
support caching.
Staticresolve
Represents a source of texture data for a CoreContextTexture.
Remarks
Texture sources are used to populate a CoreContextTexture when that texture is loaded. Texture data retrieved by the CoreContextTexture by the
getTextureDatamethod. It's the responsibility of the concereteTexturesubclass to implement this method appropriately.