Skip to content

Commit 945bb23

Browse files
committed
Ownership of font atlas should be STBText
1 parent 3e59093 commit 945bb23

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

engine/core/subsystem/UISystem.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ bool UISystem::loadFontAtlas(TextComponent& text, UIComponent& ui, UILayoutCompo
194194
}
195195

196196
ui.texture.setData(fontId, *text.stbtext->getTextureData());
197-
ui.texture.setReleaseDataAfterLoad(true);
198197

199198
ui.needUpdateTexture = true;
200199

@@ -899,7 +898,6 @@ void UISystem::destroyText(TextComponent& text){
899898

900899
if (text.stbtext){
901900
text.stbtext.reset();
902-
text.stbtext = NULL;
903901
}
904902
}
905903

engine/core/texture/Texture.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,11 @@ void Texture::destroy(){
366366

367367
if (render) {
368368
render.reset();
369-
render = NULL;
370369
TexturePool::remove(id);
371370
}
372371

373372
if (data) {
374373
data.reset();
375-
data = NULL;
376374
TextureDataPool::remove(id);
377375
}
378376

0 commit comments

Comments
 (0)