John van de Waeter 7 Posted March 26, 2021 Hi All, In a FMX IOS project, I turned on Metal to have a much more smoothly scrolling scrollbox. In project source: if TUIScreen.Wrap(TUIScreen.OCClass.mainScreen).nativeScale=TUIScreen.Wrap(TUIScreen.OCClass.mainScreen).Scale then begin GlobalUseMetal :=true; GlobalEventDrivenDisplayUpdates := true; GlobalPreferredFramesPerSecond := 60; end; Works great. But in another part of the same project, I have image1.bitmap.savetofile(docpath+'filename.png') This works okay if Metal is not used, but crashes if Metal is used. Delphi 10.4.1 Is this a bug or am I missing something? tia, John Share this post Link to post
enesgeven 6 Posted April 2, 2021 Hi, Yes Metal Api crashes some bitmap methods like FlipHorizontal crashes on Metal Api too, but I have good news it is fixed on 10.4.2 I did not try savetofile but FlipHorizontal working now on Metal Api, also there is more fix for Metal Api on 10.4.2, you can check fix list. and you have to set false GlobalEventDrivenDisplayUpdates if you wanna stable 60 fps, more info: http://docwiki.embarcadero.com/RADStudio/Sydney/en/FireMonkey_New_Features_and_Enhancements Quote FMX.Types.GlobalPreferredFramesPerSecond: integer=60; It is the rate where the draw loop updates its contents. Integer variable to set the rate at which the draw loop update its contents when GlobalEventDrivenDisplayUpdates is set to False. Share this post Link to post
John van de Waeter 7 Posted April 12, 2021 Thanks Enesgeven I finally upgraded to 10.4.2 and it seems to be solved. Thanks for responding :) John 1 Share this post Link to post