Recent

Author Topic: Cocoa Graphics Very Slow  (Read 3047 times)

josh

  • Hero Member
  • *****
  • Posts: 754
Cocoa Graphics Very Slow
« on: November 09, 2016, 02:39:10 pm »
Hi
Hope their is a fix for this.
After doing some testing; with placing images from an timagelist on a panel, the Cocoa seems to be 10% as fast as carbon, or carbon is 900% faster than cocoa.
I have created a vid to demonstrate the problem.
https://www.dropbox.com/s/vr43ztm0vsiml0u/slowcocoa.mp4?dl=0

Anyone else experiencing this slowness in cocoa?

I will create a simple test version and upload that does not require any 3rd party components.

Josh

ps You can also see in the video; a difference in the background blue color.
« Last Edit: November 09, 2016, 03:14:32 pm by josh »
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: Cocoa Graphics Very Slow
« Reply #1 on: November 12, 2016, 09:39:09 am »
I'm curious if you don't use TImageList but instead TBitmap or something like that directly if it would be better.

Also instead of TPanel, try TCustomControl.

I have a motion graphics app with Cocoa and the speed was OK, but I use TBitmap + TCustomControl.

If changing to TBitmap+TcustomControl doesn't work, then this will be very challanging to fix. Cocoa drawing APIs are pretty crappy, so a lot of data copying operations are needed.

josh

  • Hero Member
  • *****
  • Posts: 754
Re: Cocoa Graphics Very Slow
« Reply #2 on: November 12, 2016, 09:54:21 am »
Hi felipemdc.

I have not tried that, but have reported the issue in bugtracker, and have included a zipped version of the project; with an additional video link; that demonstrates the problem even better and also demos the problem with font rendering.

Hopefully someone will look at the bugtracker and it will get assigned.

http://bugs.freepascal.org/view.php?id=30916
« Last Edit: November 12, 2016, 09:56:21 am by josh »
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.