Class: TextureGCSystem

PIXI.TextureGCSystem

System plugin to the renderer to manage texture garbage collection on the GPU, ensuring that it does not get clogged up with textures that are no longer being used.

new PIXI.TextureGCSystem (renderer)

Name Type Description
renderer PIXI.Renderer

The renderer this System works for.

Implements

Members

PIXI.TextureGCSystem.defaultCheckCountMax static

Default frames between two garbage collections.

Default Value:
  • 600
See:

PIXI.TextureGCSystem.defaultMaxIdle static

Default maximum idle frames before a texture is destroyed by garbage collection.

Default Value:
  • 3600
See:

PIXI.TextureGCSystem.defaultMode PIXI.GC_MODES static

Default garbage collection mode.

Default Value:
  • PIXI.GC_MODES.AUTO
See:

checkCount number readonly

Frame count since last garbage collection.

checkCountMax number

Frames between two garbage collections.

See:

count number readonly

Frame count since started.

maxIdle number

Maximum idle frames before a texture is destroyed by garbage collection.

See:

Current garbage collection mode.

See:

Methods

Checks to see when the last time a texture was used. If the texture has not been used for a specified amount of time, it will be removed from the GPU.

unload (displayObject) void

Removes all the textures within the specified displayObject and its children from the GPU.

Name Type Description
displayObject PIXI.DisplayObject

the displayObject to remove the textures from.

postrender () void protected

Checks to see when the last time a texture was used. If the texture has not been used for a specified amount of time, it will be removed from the GPU.