Skip to content

feat(LuaRenderer): native resizing support#583

Merged
Aurumaker72 merged 8 commits intomainfrom
presenter-resize
Mar 31, 2026
Merged

feat(LuaRenderer): native resizing support#583
Aurumaker72 merged 8 commits intomainfrom
presenter-resize

Conversation

@Aurumaker72
Copy link
Copy Markdown
Member

Lua script drawing surfaces will now resize with the main window.

Copilot AI review requested due to automatic review settings March 30, 2026 17:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds native resize handling to the Lua rendering overlays so Lua script drawing surfaces track the main window size without forcing renderer recreation.

Changes:

  • Extends the Presenter interface with a resize(D2D1_SIZE_U) API and wires it into LuaRenderer on main-window SizeChanged events.
  • Implements DComp presenter resizing by resizing swapchain buffers and rebuilding size-dependent resources.
  • Removes the previous “destroy/recreate renderer on resize” behavior from the Lua GUI ResizeWindow path.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/Views.Win32/lua/presenters/Presenter.h Adds Presenter::resize() to support in-place resizing.
src/Views.Win32/lua/presenters/GDIPresenter.h Declares GDIPresenter::resize() override.
src/Views.Win32/lua/presenters/GDIPresenter.cpp Adds (currently empty) GDIPresenter::resize() implementation stub.
src/Views.Win32/lua/presenters/DCompPresenter.h Adds resize()/size() ordering updates and stores HWND for DPI access.
src/Views.Win32/lua/presenters/DCompPresenter.cpp Implements swapchain/resource resize path for DComp presenter.
src/Views.Win32/lua/modules/WGUI.h Stops forcibly recreating the Lua renderer when resizing the main window.
src/Views.Win32/lua/LuaRenderer.cpp Subscribes to SizeChanged, resizes overlay windows and backing surfaces, and forwards resize to the active presenter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Aurumaker72 Aurumaker72 merged commit a17b61b into main Mar 31, 2026
10 of 11 checks passed
@Aurumaker72 Aurumaker72 deleted the presenter-resize branch March 31, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants