I have submitted this via Feedback Assistant but am posting this here to ensure this bug gets some attention.
On previous versions of macOS, when you invalidated an area using setNeedsDisplayInRect:, calling the getRectsBeingDrawn:count: method in the drawRect: method for a view would correctly return the invalidated area.
Under Big Sur Beta 9, calling getRectsBeingDrawn:count: to determine the invalid area always returns the entire frame of the view. This is bad because routines that rely on getRectsBeingDrawn:count: to optimize drawing are getting the wrong information, and will draw more than they need to draw.
But even more serious is this: even getRectsBeingDrawn:count: reports the entire view as being invalid, you cannot successfully to draw into the area that has not been invalidated.
A sample demonstrating the problem can be found at https://github.com/TroikaTronix/BigSurDrawingTest
The READ ME gives further details about the bug and how the sample code reproduces the problem.
On previous versions of macOS, when you invalidated an area using setNeedsDisplayInRect:, calling the getRectsBeingDrawn:count: method in the drawRect: method for a view would correctly return the invalidated area.
Under Big Sur Beta 9, calling getRectsBeingDrawn:count: to determine the invalid area always returns the entire frame of the view. This is bad because routines that rely on getRectsBeingDrawn:count: to optimize drawing are getting the wrong information, and will draw more than they need to draw.
But even more serious is this: even getRectsBeingDrawn:count: reports the entire view as being invalid, you cannot successfully to draw into the area that has not been invalidated.
A sample demonstrating the problem can be found at https://github.com/TroikaTronix/BigSurDrawingTest
The READ ME gives further details about the bug and how the sample code reproduces the problem.