I found that scale of window by X (800x600 -> 1800x600) don't slow down the rendering.scale of window by Y (800x600 -> 800x1200) DOES slow down (600->1200, slower by 2 times).so the reason is: Canvas.TextOut (or LCLIntf.ExtTextOut) is slowing down all render.I also see that debugger stops inside the ExtTextOut (most of the time, in 80%).I cannot solve it, TextOut (ExtTextOut) on linux is not known code to me.the same slowdown occurs on gtk2 and qt5.so it is mostly Lazarus issue of gtk2/qt5 codes.
Why don't you use DrawText from LCLIntf? It has a lot more options then Canvas.TextOut and it works well in every widgetset(see: VirtualTreeView, OPM, etc...).
DrawText(Self.Canvas.Handle, PChar(Txt), Length(Txt), R, DT_SINGLELINE or DT_CENTER or DT_VCENTER);
It's been a while since I tested DrawText's performance but, the last time I tested it (probably under XP), its performance was downright dismal. In general, TextOut and ExtTextOut provide much better performance even when custom user code has to replicate some of the DrawText features.
I need the Dx array of char offsets; DrawText isn't allowing it..