Menu

#5 Unnecessary calls of FRepaintOptimizer.Reset

v2.0.0
pending-accepted
nobody
5
2012-08-29
2009-03-02
Anonymous
No

GR32_Image.pas

Old version:

procedure TCustomImage32.InvalidateCache;
begin
if FRepaintOptimizer.Enabled then FRepaintOptimizer.Reset;
CacheValid := False;
end;

New version:
Simple but much more faster in many cases.

procedure TCustomImage32.InvalidateCache;
begin
if FRepaintOptimizer.Enabled and CacheValid then FRepaintOptimizer.Reset;
CacheValid := False;
end;

Discussion

  • Christian-W. Budde

    • labels: --> Optimization
    • milestone: --> v2.0.0
    • status: open --> pending-accepted
     
  • Christian-W. Budde

    Applied, but needs further testing to see whether it works flawlessly.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.