DesktopCanvas Invalidate

I noticed Invalidate is removed from the DesktopCanvas control.
Why has this been removed and what is the real replacement for this?

I tried Refresh(true) and Refresh(false) but both are way way way too slow compared to Invalidate.

Passing false is supposed to be the equivalent of Invalidate.

https://documentation.xojo.com/api/user_interface/desktop/desktopuicontrol.html#desktopuicontrol-refresh

In my tests that isn’t the case. It is faster but not as fast when using .invalidate in an API1 project.
In one of my apps (does all sort of animation stuff) the difference is quite big.

API1
Canvas.Invalidate - I get 196fps

API2
DesktopCanvas.refresh(false) - I get 123fps
DesktopCanvas.refresh(true) - I get 24fps

That’s not good! You might have to open a ticket about the speed difference because you weren’t misunderstanding API 2 / Invalidate / Refresh.

4 Likes