| 203 | } |
| 204 | |
| 205 | void FontTextureAtlas::Flush() |
| 206 | { |
| 207 | if (_isDirty) |
| 208 | { |
| 209 | EnsureTextureCreated(); |
| 210 | |
| 211 | // Upload data to the GPU |
| 212 | BytesContainer data; |
| 213 | data.Link(_data); |
| 214 | auto task = _texture->UploadMipMapAsync(data, 0); |
| 215 | if (task) |
| 216 | task->Start(); |
| 217 | |
| 218 | // Clear dirty flag |
| 219 | _isDirty = false; |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | void FontTextureAtlas::EnsureTextureCreated() const |
| 224 | { |
nothing calls this directly
no test coverage detected