Commit Graph

18 Commits

Author SHA1 Message Date
daiqingshuang
7de09daeb1 feat: Enhance glyph caching and tooltip management
- Added a new atomic cache versioning system to track glyph updates in glyph_cache.
- Introduced methods to check for pending glyph tasks and retrieve the current cache version.
- Improved text shaping logic to estimate glyph advances for unready glyphs, ensuring smoother rendering.
- Refactored render_thread to focus on a single target window for rendering, enhancing performance.
- Updated thread_coordinator to manage window IDs and ensure proper rendering context.
- Implemented a new tooltip management system using render_window for better rendering control.
- Enhanced tooltip display logic to dynamically create and resize tooltip windows based on content.
- Added functionality to pre-request glyphs for tooltips to ensure they are ready when displayed.
- Improved window management with additional methods for setting position, resizing, and visibility checks.
2025-12-18 14:05:36 +08:00
daiqingshuang
fb57d69456 封装窗口渲染循环 2025-12-17 20:04:12 +08:00
daiqingshuang
4fd98b32e3 文件夹整理 2025-12-17 19:21:16 +08:00
3629038519 fix(render): 修复纹理加载路径并更新渲染通道管理逻辑 2025-12-15 19:48:47 +08:00
daiqingshuang
a9dca86506 feat: Implement tooltip manager and window widget
- Added tooltip_manager class to manage tooltip display and hiding with delay.
- Introduced tooltip_window_widget for rendering tooltips in a floating window.
- Created tooltip_types.h for tooltip configuration and position enums.
- Implemented padding_wrapper for inner padding in tooltip content.
- Added methods for showing tooltips near widgets and at specific screen positions.
- Integrated content management for tooltips, including text and custom widgets.
- Enhanced layout and rendering logic for tooltip windows.
2025-12-15 19:26:18 +08:00
6d0db27d0b feat: 添加剪贴板支持和IME管理功能,更新相关接口和实现 2025-12-13 15:49:06 +08:00
702629bac3 Implement text model and selection management for UTF-32 text handling
- Added `text_model` class to manage text content and selection state, supporting UTF-32 storage for accurate character-level operations.
- Implemented UTF-8 to UTF-32 conversion functions for seamless text input.
- Introduced `text_selection` class to represent selection ranges using anchor/focus model.
- Added methods for text insertion, deletion, and selection management, including word boundary detection.
- Implemented maximum length constraints for text input.
- Provided callback mechanism for text change notifications.
2025-12-13 13:06:46 +08:00
db2755256b Refactor event handling by eliminating event_target interface
- Merged event_target functionality into widget_base to simplify class hierarchy and reduce complexity.
- Updated focus_manager, ime_manager, shortcut_manager, and widget_event_router to use widget_base instead of event_target.
- Removed redundant event_target inheritance from various widget classes, including overlay and scrollbar.
- Ensured proper event bubbling and visibility management by utilizing widget_base's parent pointer.
- Cleaned up related documentation and updated method signatures across the codebase.
2025-12-12 22:39:13 +08:00
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