import { GC_MODES } from '@pixi/constants'; import type { ISystem } from '../system/ISystem'; import type { Renderer } from '../Renderer'; import type { Texture } from './Texture'; import type { RenderTexture } from '../renderTexture/RenderTexture'; import type { ExtensionMetadata } from '@pixi/extensions'; export interface IUnloadableTexture { _texture: Texture | RenderTexture; children: IUnloadableTexture[]; } /** * 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. * @memberof PIXI */ export declare class TextureGCSystem implements ISystem { /** @ignore */ static extension: ExtensionMetadata; /** * Count * @readonly */ count: number; /** * Check count * @readonly */ checkCount: number; /** * Maximum idle time, in seconds * @see PIXI.settings.GC_MAX_IDLE */ maxIdle: number; /** * Maximum number of item to check * @see PIXI.settings.GC_MAX_CHECK_COUNT */ checkCountMax: number; /** * Current garbage collection mode * @see PIXI.settings.GC_MODE */ mode: GC_MODES; private renderer; /** @param renderer - The renderer this System works for. */ constructor(renderer: Renderer); /** * 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 */ protected postrender(): void; /** * 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 */ run(): void; /** * Removes all the textures within the specified displayObject and its children from the GPU * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from. */ unload(displayObject: IUnloadableTexture): void; destroy(): void; }