Jump to content
John van de Waeter

iOS Metal and bitmap.savetofile

Recommended Posts

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×