Refactor widget framework for thread safety and state management
- Updated v_stack.h to use threading::main_property for spacing management, ensuring automatic dirty marking on changes. - Enhanced render_collector.h with threading::thread_bound for thread safety, added documentation for thread usage. - Modified widget_state.h to include previous_aabb for dirty region calculations. - Implemented update_previous_aabb method in widget_state_store to track previous AABB for widgets. - Refactored viewport_cache to utilize threading::main_property for caching and visibility management. - Updated widget_base.h to use threading::main_property for widget attributes, ensuring thread-safe access. - Enhanced widget_context.h with threading::property for managing state changes. - Refactored imager and scrollbar widgets to utilize new property management for state consistency. - Added comprehensive documentation for thread safety and usage across the widget framework.
This commit is contained in:
@@ -26,8 +26,8 @@ int main(int argc, char* argv[]) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
auto texture_id = app.texture_mgr()->load_texture("D:\\G2uY1fJa8AAOucs.jpg").value();
|
||||
// auto texture_id = app.texture_mgr()->load_texture("D:\\screenshot-20251128-165627.png").value();
|
||||
// auto texture_id = app.texture_mgr()->load_texture("D:\\G2uY1fJa8AAOucs.jpg").value();
|
||||
auto texture_id = app.texture_mgr()->load_texture("D:\\screenshot-20251128-165627.png").value();
|
||||
auto tex_size = app.texture_mgr()->get_texture(texture_id)->size().cast<float>();
|
||||
|
||||
// 加载字体
|
||||
|
||||
Reference in New Issue
Block a user