Changeset 454 for GraphicTest/Methods


Ignore:
Timestamp:
Nov 26, 2012, 7:38:56 AM (12 years ago)
Author:
chronos
Message:
  • Added: Now PixelFormat for tests where TBitmap is used can be changed.
  • Fixed: Stopping of test of all methods.
Location:
GraphicTest/Methods
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • GraphicTest/Methods/UBGRABitmapPaintBox.pas

    r447 r454  
    77uses
    88  Classes, SysUtils, UDrawMethod, UFastBitmap, BGRABitmap, BGRABitmapTypes,
    9   Controls;
     9  Controls, Graphics;
    1010
    1111type
     
    1515    BGRABitmap: TBGRABitmap;
    1616    procedure Paint(Sender: TObject); override;
    17     procedure Init(Parent: TWinControl; Size: TPoint); override;
     17    procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override;
    1818    constructor Create; override;
    1919    destructor Destroy; override;
     
    3232end;
    3333
    34 procedure TBGRABitmapPaintBox.Init(Parent: TWinControl; Size: TPoint);
     34procedure TBGRABitmapPaintBox.Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat);
    3535begin
    36   inherited Init(Parent, Size);
     36  inherited;
    3737  BGRABitmap.SetSize(PaintBox.Width, PaintBox.Height);
    3838end;
  • GraphicTest/Methods/UCanvasPixels.pas

    r447 r454  
    2525  inherited;
    2626  Caption := 'TBitmap.Canvas.Pixels';
     27  Description.Add('This is simple naive approach to copy image by accessing Pixels property. ' +
     28  'Method is slow because of much of overhead in access methods like multiple nested method calls, ' +
     29  'pixel format conversion, update notification, etc.');
    2730end;
    2831
  • GraphicTest/Methods/UCanvasPixelsUpdateLock.pas

    r447 r454  
    2525  inherited;
    2626  Caption := 'TBitmap.Canvas.Pixels Update locking';
     27  Description.Add('This method improves basic canvas pixel access by eliminating ' +
     28    'updating of visible area during complete operation. Image data is ' +
     29    'painted only one at the end of complete operation');
    2730end;
    2831
  • GraphicTest/Methods/UDummyMethod.pas

    r447 r454  
    2525  inherited Create;
    2626  Caption := 'Dummy';
     27  Description.Add('This method doesn''t draw anything. It''s purpose is to measure ' +
     28    'and compare speed of system and event handling.');
    2729end;
    2830
  • GraphicTest/Methods/UGraphics32Method.pas

    r450 r454  
    66
    77uses
    8   Classes, SysUtils, UFastBitmap, UDrawMethod, GR32, GR32_Image, Controls;
     8  Classes, SysUtils, UFastBitmap, UDrawMethod, GR32, GR32_Image, Controls,
     9  Graphics;
    910
    1011type
     
    1617    destructor Destroy; override;
    1718    procedure DrawFrame(FastBitmap: TFastBitmap); override;
    18     procedure Init(Parent: TWinControl; Size: TPoint); override;
     19    procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override;
    1920    procedure Done; override;
    2021  end;
     
    2930  inherited Create;
    3031  Caption := 'TGR32Image';
     32  Description.Add('Graphics32 is well implemented highly optimized Delphi graphic ' +
     33    'library also ported to Lazarus/LCL. It uses static 32-bit wide pixel:');
     34  Description.Add('TColor32Entry = packed record');
     35  Description.Add('  case Integer of');
     36  Description.Add('    0: (B, G, R, A: Byte);');
     37  Description.Add('    1: (ARGB: TColor32);');
     38  Description.Add('    2: (Planes: array[0..3] of Byte);');
     39  Description.Add('    3: (Components: array[TColor32Component] of Byte);');
     40  Description.Add('end;');
    3141end;
    3242
     
    6676end;
    6777
    68 procedure TGraphics32Method.Init(Parent: TWinControl; Size: TPoint);
     78procedure TGraphics32Method.Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat);
    6979begin
    70   inherited Init(Parent, Size);
     80  inherited;
    7181  Image := TImage32.Create(Parent);
    7282  Image.Parent := Parent;
  • GraphicTest/Methods/ULazIntfImageColorsNoCopy.pas

    r447 r454  
    1313  TLazIntfImageColorsNoCopy = class(TDrawMethodImage)
    1414    TempIntfImage: TLazIntfImage;
    15     procedure Init(Parent: TWinControl; Size: TPoint); override;
     15    procedure Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override;
    1616    constructor Create; override;
    1717    destructor Destroy; override;
     
    2424{ TLazIntfImageColorsNoCopy }
    2525
    26 procedure TLazIntfImageColorsNoCopy.Init(Parent: TWinControl; Size: TPoint);
     26procedure TLazIntfImageColorsNoCopy.Init(Parent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat);
    2727begin
    28   inherited Init(Parent, Size);
     28  inherited;
    2929  TempIntfImage.Free;
    3030  TempIntfImage := Image.Picture.Bitmap.CreateIntfImage;
  • GraphicTest/Methods/UOpenGLPBOMethod.pas

    r452 r454  
    66
    77uses
    8   Classes, SysUtils, UDrawMethod, UFastBitmap, Controls
     8  Classes, SysUtils, UDrawMethod, UFastBitmap, Controls, Graphics
    99  {$IFDEF opengl}, GL, GLExt, OpenGLContext{$ENDIF};
    1010
     
    1616    pboIds: array[0..1] of GLuint;
    1717    Index, NextIndex: Integer;
    18     procedure Init(AParent: TWinControl; Size: TPoint); override;
     18    procedure Init(AParent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat); override;
    1919    constructor Create; override;
    2020    destructor Destroy; override;
     
    3131//procedure glGenBuffersARB2 : procedure(n : GLsizei; buffers : PGLuint); extdecl;
    3232
    33 procedure TOpenGLPBOMethod.Init(AParent: TWinControl; Size: TPoint);
     33procedure TOpenGLPBOMethod.Init(AParent: TWinControl; Size: TPoint; PixelFormat: TPixelFormat);
    3434var
    3535  DataSize: Integer;
Note: See TracChangeset for help on using the changeset viewer.