Always render world viewer rect at full window size.#290
Conversation
Transitions to/from mouselook on extreme resolution displays was resulting in window buffers repeatedly being torn down and recreated
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR disables the dynamic world view rectangle recalculation in ChangesWorld View Rectangle Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Clang (14.0.6)indra/newview/llviewerwindow.cppPLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. ... [truncated 3695 characters] ... hared_ptrINS_18CompilerInvocationEES7_INS_22PCHContainerOperationsEE+0x134)[0x7f2949996204] 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)
indra/newview/llviewerwindow.cpp (1)
4330-4345: ⚡ Quick winRemove the disabled dynamic resize branch and the now-unused
use_full_windowparameter
LLViewerWindow::updateWorldViewRect(bool use_full_window)currently only readsuse_full_windowinside the#if 0block, so that parameter is effectively dead. Delete the disabled branch to make the “always full-window” behavior explicit, and then dropuse_full_windowfrom the signature and update the two call sites (updateWorldViewRect(world_view_uses_full_window)andupdateWorldViewRect(!show_ui)).♻️ Proposed change in this hunk
-#if 0 // Disable dynamic world view resizing for now since it causes some peformance issues on large displays when entering/leaving - // mouselook or hiding UI. We can re-enable this in the future when we have a better solution for the performance issues, such as - // rendering to a smaller offscreen buffer and then upscaling to the window size. - if (!use_full_window && mWorldViewPlaceholder.get()) - { - new_world_rect = mWorldViewPlaceholder.get()->calcScreenRect(); - // clamp to at least a 1x1 rect so we don't try to allocate zero width gl buffers - new_world_rect.mTop = llmax(new_world_rect.mTop, new_world_rect.mBottom + 1); - new_world_rect.mRight = llmax(new_world_rect.mRight, new_world_rect.mLeft + 1); - - new_world_rect.mLeft = ll_round((F32)new_world_rect.mLeft * mDisplayScale.mV[VX]); - new_world_rect.mRight = ll_round((F32)new_world_rect.mRight * mDisplayScale.mV[VX]); - new_world_rect.mBottom = ll_round((F32)new_world_rect.mBottom * mDisplayScale.mV[VY]); - new_world_rect.mTop = ll_round((F32)new_world_rect.mTop * mDisplayScale.mV[VY]); - } -#endif + // Intentionally always render world view at full window size.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@indra/newview/llviewerwindow.cpp` around lines 4330 - 4345, Remove the dead dynamic-resize branch and the unused parameter by deleting the entire disabled `#if` 0 block inside LLViewerWindow::updateWorldViewRect and then remove the bool use_full_window parameter from the method signature and any declarations; update all call sites (e.g., updateWorldViewRect(world_view_uses_full_window) and updateWorldViewRect(!show_ui)) to call the parameterless LLViewerWindow::updateWorldViewRect(), and adjust any forward declarations or overrides to match the new signature so compilation succeeds.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@indra/newview/llviewerwindow.cpp`:
- Around line 4330-4345: Remove the dead dynamic-resize branch and the unused
parameter by deleting the entire disabled `#if` 0 block inside
LLViewerWindow::updateWorldViewRect and then remove the bool use_full_window
parameter from the method signature and any declarations; update all call sites
(e.g., updateWorldViewRect(world_view_uses_full_window) and
updateWorldViewRect(!show_ui)) to call the parameterless
LLViewerWindow::updateWorldViewRect(), and adjust any forward declarations or
overrides to match the new signature so compilation succeeds.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 8a0b98ce-9ea6-4790-a477-f1e34ca36c83
📒 Files selected for processing (1)
indra/newview/llviewerwindow.cpp
Description
Transitions to/from mouselook on extreme resolution displays was resulting in window buffers repeatedly being torn down and recreated.
Related Issues
Issue Link:
Checklist
Please ensure the following before requesting review:
Additional Notes