Commit Graph

10 Commits

Author SHA1 Message Date
daiqingshuang
9023922ef7 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.
2025-12-12 14:04:40 +08:00
036763ef87 fix: 修复纹理加载路径和文本渲染器初始化,调整抗锯齿宽度 2025-12-11 22:43:42 +08:00
daiqingshuang
2d2c58ed65 Refactor test structure and remove obsolete tests
- Removed `render_tree_builder` and `render_tree_integration` test directories and their associated CMakeLists and source files.
- Updated `CMakeLists.txt` to exclude the removed test directories.
- Modified buffer creation templates to include `vk::Result` in expected return types for better error handling.
2025-12-11 01:47:46 +08:00
daiqingshuang
212968434e feat: Implement scroll_box container with smooth scrolling and scrollbar management
- Added scroll_box class to manage scrolling of content exceeding viewport size.
- Introduced scroll_state class to encapsulate scrolling state and calculations.
- Created scrollbar_manager class to handle scrollbar creation, layout, and updates.
- Developed smooth_scroll_animator class for smooth scrolling animations with easing functions.
- Enhanced child widget management using slots and improved event handling.
- Utilized C++23 features for better code structure and readability.
- Implemented various scrolling modes: vertical, horizontal, and both.
- Added methods for setting scroll offsets, scrolling to specific positions, and querying scroll properties.
2025-12-08 18:18:00 +08:00
daiqingshuang
3b90ba2c1b feat: 更新目标帧率配置为可选,支持使用屏幕刷新率,优化渲染线程超时计算 2025-12-08 17:54:59 +08:00
daiqingshuang
6539d59b8a feat: 优化交换链配置和帧同步机制,调整目标帧率和多线程设置 2025-12-08 17:20:20 +08:00
daiqingshuang
65ed021c7e feat: 添加自适应同步和三缓冲支持,优化渲染配置 2025-12-08 16:22:55 +08:00
daiqingshuang
91dc9a119b feat: Optimize rendering commands and visibility management
- Implemented binary search optimization for rendering commands in HStack and VStack to improve performance when rendering child widgets.
- Enhanced ScrollBox to only tick child widgets that are within the viewport, reducing unnecessary updates.
- Introduced a viewport cache to manage visibility states of widgets, allowing for efficient visibility checks and updates.
- Updated dirty state management in widget states to use a more structured approach with a new dirty_state enum, improving clarity and functionality.
- Added methods to invalidate and manage viewport cache, ensuring that visibility states are accurately maintained during layout changes.
- Marked widgets for re-rendering when their properties change, ensuring visual updates are reflected correctly.
2025-12-08 14:08:13 +08:00
66d4a07631 feat: enable vsync in application configuration 2025-12-07 22:47:21 +08:00
571f27711b TODO 多线程渲染 2025-12-07 13:11:02 +08:00