Changeset 196 for trunk/Start.pas


Ignore:
Timestamp:
May 7, 2020, 11:42:52 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Optimized drawing using BitBlt directly instead of CopyRect which is slower due to additional code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r194 r196  
    721721  BiColorTextOut(Canvas, Colors.Canvas.Pixels[clkAge0 - 1, cliDimmedText],
    722722    $000000, xAction, y + 21, Phrases2.Lookup(TextItem));
     723
     724  // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
     725  LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
    723726  BitBltCanvas(LogoBuffer.Canvas, 0, 0, 50, 50, Canvas,
    724727    xActionIcon - 2, y - 2);
     
    817820      TabOffset + (Integer(Tab) + 1) * TabSize + 2, TabHeight, MainTexture.clBevelShade,
    818821      MainTexture.clBevelShade); // Tab shadow
     822  // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
     823  LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
    819824  BitBltCanvas(LogoBuffer.Canvas, 0, 0, 36, 36, Canvas, 6,
    820825    3 + 2 * integer(Tab <> tbMain));
     
    827832    LogoBuffer.Canvas, 0, 0);
    828833
    829   if Page = pgMain then
    830   begin
     834  if Page = pgMain then begin
    831835    if SelectedAction <> maNone then // mark selected action
    832836      for i := 0 to (ClientWidth - 2 * ActionSideBorder) div wBuffer + 1 do
     
    840844          h := ClientHeight - ActionBottomBorder -
    841845            (yAction + Integer(SelectedAction) * ActionPitch - 8);
     846        // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
     847        LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
    842848        BitBltCanvas(LogoBuffer.Canvas, 0, 0, w, h, Canvas,
    843849          ActionSideBorder + i * wBuffer, yAction + Integer(SelectedAction) * ActionPitch
     
    864870                Phrases2.Lookup('ACTIONHEADER_WEB'));
    865871              Canvas.Font.Assign(UniFont[ftNormal]);
     872              // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
     873              LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
    866874              BitBltCanvas(LogoBuffer.Canvas, 0, 0, 91, 25, Canvas,
    867875                xActionIcon, y + 2);
Note: See TracChangeset for help on using the changeset viewer.