-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate window input event transform only on window change #59310
Calculate window input event transform only on window change #59310
Conversation
e7dcb5a
to
3927653
Compare
I noticed, that it is a bad idea to merge "Stretch Transform" into "Window transform", because one could imagine, that "Stretch Transform" could be changed without knowledge of Extended MRP: |
8603d2a
to
6495695
Compare
a0e9b3c
to
9fde607
Compare
Originally, this enhancement PR contained a bugfix. I have split this bugfix into its own PR: #59709 |
9fde607
to
f0c7804
Compare
f0c7804
to
5a4b0a5
Compare
5a4b0a5
to
2bf2217
Compare
This has been updated / simplified, would be good to review further. I'm not 100% clear on what are the actual benefits of this PR though. Is this a performance optimization, or does it solve issues? |
Since I don't intend to change any functionality with this PR, it does not solve any issues.
In a followup I want to remove
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved in PR review meeting.
Thanks! |
Currently during every event processing,
Viewport::_get_input_pre_xform()
calculates theTransform2D
, that is based on a few attributes of Windows likeCONTENT_SCALE_ASPECT
,CONTENT_SCALE_MODE
and others.However this Transform2D only changes, when the window changes.
With this patch, the
Transform2D
gets only recalculated after a window change.This change also makes several transform-calculations in
Viewport
simpler.My MRP for testing these changes consists of multiple subwindows, that can be configured with all available options:
WindowsTestbed.zip (updated 2022-05-07 since Input-API changed, updated 2022-09-18 since Transform2D-API changed)
Update 2022-10-01: split nonessential parts into other PRs