refactor(compositor): remove pimpl wrapper from CompositorServer#140
refactor(compositor): remove pimpl wrapper from CompositorServer#140
Conversation
Review Summary by QodoRemove pimpl wrapper from CompositorServer
WalkthroughsDescription• Remove pimpl wrapper pattern from CompositorServer class • Replace m_impl->state with direct m_state pointer • Simplify member variable access throughout codebase • Add forward declaration of CompositorState struct Diagramflowchart LR
A["CompositorServer with Impl pimpl"] -->|Remove Impl wrapper| B["CompositorServer with direct CompositorState"]
C["m_impl->state access pattern"] -->|Simplify to| D["m_state access pattern"]
File Changes1. src/compositor/compositor_server.hpp
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewⓘ The new review experience is currently in Beta. Learn more |
📝 WalkthroughWalkthroughThe pull request refactors Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/render/test_filter_boundary_contracts.cpp (1)
183-186: Optional: reduce brittleness of source-text contract checks.These assertions are valid for this PR, but they tightly couple tests to member names. Consider matching higher-level intent (e.g., ordering of store + wake call) with less exact string dependency.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/render/test_filter_boundary_contracts.cpp` around lines 183 - 186, The test currently couples to exact member names by searching for "m_state->target_fps.store(...)" and "m_state->wake_event_loop()", so change the assertions to instead detect the intended ordering (a store followed by a wake) using less brittle text checks: use compositor_server_text->find to search for a more general substring like "store(" or "target_fps" and "wake_event_loop" (or a regex matching "store\\s*\\(") and assert compositor_set_target_pos < compositor_wake_pos, keeping the existing variables compositor_set_target_pos and compositor_wake_pos to locate positions without depending on the full member name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests/render/test_filter_boundary_contracts.cpp`:
- Around line 183-186: The test currently couples to exact member names by
searching for "m_state->target_fps.store(...)" and "m_state->wake_event_loop()",
so change the assertions to instead detect the intended ordering (a store
followed by a wake) using less brittle text checks: use
compositor_server_text->find to search for a more general substring like
"store(" or "target_fps" and "wake_event_loop" (or a regex matching
"store\\s*\\(") and assert compositor_set_target_pos < compositor_wake_pos,
keeping the existing variables compositor_set_target_pos and compositor_wake_pos
to locate positions without depending on the full member name.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 244ea4a5-c294-4265-88f2-180f3ac393bc
📒 Files selected for processing (8)
src/compositor/compositor_cursor.cppsrc/compositor/compositor_focus.cppsrc/compositor/compositor_input.cppsrc/compositor/compositor_present.cppsrc/compositor/compositor_server.cppsrc/compositor/compositor_server.hppsrc/compositor/compositor_state.hpptests/render/test_filter_boundary_contracts.cpp
💤 Files with no reviewable changes (1)
- src/compositor/compositor_state.hpp
Summary by CodeRabbit