Recent

Author Topic: BGRABitmap on Linux: can TextOut be faster than TCanvas?  (Read 442 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2697
    • UVviewsoft
BGRABitmap on Linux: can TextOut be faster than TCanvas?
« on: December 26, 2025, 09:43:49 pm »
I want to optimize CudaText on Linux/BSD: make font rendering via BGRABitmap.
for this, I must have BGRABitmap's TextOut much faster than TCanvas.ExtTextOut. at least 2 times faster.

but according to this issue, I cannot get it!
https://github.com/bgrabitmap/bgrabitmap/issues/317

how to get the goal?

Fred vS

  • Hero Member
  • *****
  • Posts: 3882
    • StrumPract is the musicians best friend
Re: BGRABitmap on Linux: can TextOut be faster than TCanvas?
« Reply #1 on: December 26, 2025, 10:45:53 pm »
Hello  Alex.

I try to understand why and I am confused by a previous post of you :
https://forum.lazarus.freepascal.org/index.php?topic=59069.0

There gtk2 is faster.  :-X

Maybe a optimization in BGRAGtkBitmap.pas  could be done (Pango/Cairo usage).
But for this, Circular advice is the most precious.
« Last Edit: December 26, 2025, 10:50:03 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

circular

  • Hero Member
  • *****
  • Posts: 4471
    • Personal webpage
Re: BGRABitmap on Linux: can TextOut be faster than TCanvas?
« Reply #2 on: December 27, 2025, 01:27:24 pm »
Hi folks,

I guess that in theory it would be possible to optimize for Linux. Though I don't know much of the inner workings of the system. But maybe it could be optimized by direct calls to Linux libraries and maybe by preserving an image buffer to render the text mask.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018