1 | import { GC_MODES } from '@pixi/constants';
|
2 | import type { ExtensionMetadata } from '@pixi/extensions';
|
3 | import type { Renderer } from '../Renderer';
|
4 | import type { RenderTexture } from '../renderTexture/RenderTexture';
|
5 | import type { ISystem } from '../system/ISystem';
|
6 | import type { Texture } from './Texture';
|
7 | export interface IUnloadableTexture {
|
8 | _texture: Texture | RenderTexture;
|
9 | children: IUnloadableTexture[];
|
10 | }
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export declare class TextureGCSystem implements ISystem {
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | static defaultMode: GC_MODES;
|
25 | |
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | static defaultMaxIdle: number;
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | static defaultCheckCountMax: number;
|
39 |
|
40 | static extension: ExtensionMetadata;
|
41 | |
42 |
|
43 |
|
44 |
|
45 | count: number;
|
46 | |
47 |
|
48 |
|
49 |
|
50 | checkCount: number;
|
51 | |
52 |
|
53 |
|
54 |
|
55 | maxIdle: number;
|
56 | |
57 |
|
58 |
|
59 |
|
60 | checkCountMax: number;
|
61 | |
62 |
|
63 |
|
64 |
|
65 | mode: GC_MODES;
|
66 | private renderer;
|
67 |
|
68 | constructor(renderer: Renderer);
|
69 | /**
|
70 | * Checks to see when the last time a texture was used.
|
71 | * If the texture has not been used for a specified amount of time, it will be removed from the GPU.
|
72 | */
|
73 | protected postrender(): void;
|
74 | /**
|
75 | * Checks to see when the last time a texture was used.
|
76 | * If the texture has not been used for a specified amount of time, it will be removed from the GPU.
|
77 | */
|
78 | run(): void;
|
79 | /**
|
80 | * Removes all the textures within the specified displayObject and its children from the GPU.
|
81 | * @param {PIXI.DisplayObject} displayObject - the displayObject to remove the textures from.
|
82 | */
|
83 | unload(displayObject: IUnloadableTexture): void;
|
84 | destroy(): void;
|
85 | }
|