Commit 2675f1d
Font atlas texture initialization delayed (#19384)
If you will try to create CCLabel with True Type font, enabling it's outline and change it's font size with separate commands you will create multiple textures for font atlases, one for label second for label with outline, and third for label with another font size.
Moving texture initialization from constructor and calling it later, right before usage will cause large memory economy, because even if atlases will be created they won't create textures of allocate memory for current page data.1 parent 17704df commit 2675f1d
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
343 | 341 | | |
344 | 342 | | |
345 | 343 | | |
346 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
| |||
0 commit comments