NatronGitHub / Natron

Open-source video compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
http://NatronGitHub.github.io
GNU General Public License v2.0
4.64k stars 338 forks source link

Refactor RectI & RectD methods to simplify code and improve readability. #914

Closed acolwell closed 1 year ago

acolwell commented 1 year ago

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:

PR Description

What type of PR is this? (Check one of the boxes below)

What does this pull request do?

The main goal of this change is to simplify the code and improve readability for some RectI and RectD usage. It does not change any existing functionality, but it changes some key function signatures and adds a few helpers to make the code simpler and a little easier to follow. The new signatures also make it easier to declare various variables const now, which makes it a lot easier to reason about behavior in some of the large functions in the rendering path.

Here is a summary of the changes made:

Have you tested your changes (if applicable)? If so, how?

Yes. I've build this locally, verified the tests still run and Natron appears to work as expected. No change in behavior has been observed.