Backport CanvasLayer fixes
Created by: RandomShaper
This is a pack of backports from 3.1 also fixing & enhancing CanvasLayer
in a compatible way.
UPDATE: No longer [tentative], all master's counterparts merged!
EDIT: Rewritten commits summary after updates in the PR. Again, to add commit 6. Once more.
- Commit 1 is the good one from #21245, adding an optimization (the other commit from that PR was reverted in master because it was implementing a wrong approach; see commit 5).
- Commit 2 is a cherry-pick of 9e7cee2ceb1a963c1da2c21013adf7d616412d3c, which removes the own
World2D
thatCanvasLayer
s had (therefore, fixing #17524, #17523 (closed) and #18005 (closed)). This was not backwards compatible. - Commit 3 is from #21173, letting
CanvasLayer
s have their ownWorld2D
(as always in 3.0), but adding a flag to use the default one. That is, this takes the best from the previous cherry-pick but keeps the former behavior as the default to restore compatibility. It warns about its deprecation because 3.1 has the unbroken behavior (not own world). - Commit 4: just a cherry-pick of a bug fix.
- Commit 5: cherry-picks (with conflicts solved) the only commit from #21386 (
still not merged into master), which implements the right approach to the issue about picking insideCanvasLayer
s. - Commit 6: adaptation of #23411 & #23734 (a fix the former required) to 3.0 in a back-compat way.
This code is donated by an anonymous contributor.