gtk2devicecontext.inc
procedure SetLayoutText(ALayout: PPangoLayout; AText: PChar; ALength: PtrInt);
var
  OldStr: PChar;
begin
  OldStr := pango_layout_get_text(ALayout);
  if (strlen(OldStr)<>ALength) or (strlcomp(AText, OldStr, ALength) <> 0) then
    pango_layout_set_text(ALayout, AText, ALength);
end;

as you see it's slow
a) get oldstr
b) compare oldstr by 2 funcs
why this cache is needed?
to call ExtTextOut() 20 times with the same x/y/s ?
so I suggest to del checks - just call pango_layout_set_text and that's it.

Alexey Torgashin

--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to