Add multi-thread protection to: ModelSelection.

Make UIAbstractView::notifySelectionChange thread-safe.
Added new UI Test (FontRendering.UITextTest).
This commit is contained in:
Martín Lucas Golini
2026-01-14 20:12:45 -03:00
parent 0f8f15fa53
commit f8fe1d9687
6 changed files with 126 additions and 2 deletions

View File

@@ -795,3 +795,33 @@ UTEST( FontRendering, textSetFillColor ) {
Engine::destroySingleton();
}
UTEST( FontRendering, UITextTest ) {
const auto runTest = [&]() {
UIApplication app(
WindowSettings( 1024, 650, "eepp - UI Text Test", WindowStyle::Default,
WindowBackend::Default, 32, {}, 1, false, true ),
UIApplication::Settings( Sys::getProcessPath() + ".." + FileSystem::getOSSlash(), 1 ) );
FileSystem::changeWorkingDirectory( Sys::getProcessPath() );
app.getUI()->loadLayoutFromFile( "assets/layouts/ui_text_test.xml" );
SceneManager::instance()->update();
SceneManager::instance()->draw();
compareImages( utest_state, utest_result, app.getWindow(), "eepp-ui-text-test" );
};
UTEST_PRINT_STEP( "Text Shaper disabled" );
{
BoolScopedOp op( Text::TextShaperEnabled, false );
runTest();
}
UTEST_PRINT_STEP( "Text Shaper enabled" );
{
BoolScopedOp op( Text::TextShaperEnabled, true );
runTest();
UTEST_PRINT_STEP( "Text Shaper enabled w/o optimizations" );
BoolScopedOp op2( Text::TextShaperOptimizations, false );
runTest();
}
}