Changeset 471 for GraphicTest/UMainForm.pas
- Timestamp:
- Apr 9, 2015, 8:55:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/UMainForm.pas
r470 r471 91 91 TestTerminated: Boolean; 92 92 TestTimeout: Real; 93 DrawMethodClasses: array of TDrawMethodClass; 93 94 procedure GenerateSceneFrames; 94 95 procedure TestMethod(Method: TDrawMethod); … … 96 97 procedure UpdateInterface; 97 98 procedure UpdateFrameSize; 99 procedure RegisterDrawMethods; 100 procedure RegisterDrawMethod(MethodClass: TDrawMethodClass); 98 101 public 99 102 FrameSize: TPoint; … … 117 120 UOpenGLPBOMethod, UGraphics32Method; 118 121 119 const120 DrawMethodClasses: array[0..8{$IFDEF opengl}+2{$ENDIF}{$IFDEF gr32}+1{$ENDIF}] of TDrawMethodClass = (121 TCanvasPixels, TCanvasPixelsUpdateLock, TLazIntfImageColorsCopy,122 TLazIntfImageColorsNoCopy, TBitmapRawImageData, TBitmapRawImageDataPaintBox,123 TBitmapRawImageDataMove, TBGRABitmapPaintBox124 {$IFDEF gr32}, TGraphics32Method{$ENDIF}125 {$IFDEF opengl}, TOpenGLMethod, TOpenGLPBOMethod{$ENDIF}126 ,TDummyMethod);127 128 129 130 122 { TMainForm } 131 123 … … 141 133 Randomize; 142 134 135 RegisterDrawMethods; 143 136 DrawMethods := TObjectList.Create; 144 137 for I := 0 to High(DrawMethodClasses) do begin … … 400 393 end; 401 394 395 procedure TMainForm.RegisterDrawMethods; 396 begin 397 RegisterDrawMethod(TCanvasPixels); 398 RegisterDrawMethod(TCanvasPixelsUpdateLock); 399 RegisterDrawMethod(TLazIntfImageColorsCopy); 400 RegisterDrawMethod(TLazIntfImageColorsNoCopy); 401 RegisterDrawMethod(TBitmapRawImageData); 402 RegisterDrawMethod(TBitmapRawImageDataPaintBox); 403 RegisterDrawMethod(TBitmapRawImageDataMove); 404 RegisterDrawMethod(TBGRABitmapPaintBox); 405 {$IFDEF GRAPHICS32} 406 RegisterDrawMethod(TGraphics32Method); 407 {$ENDIF} 408 {$IFDEF OPENGL} 409 RegisterDrawMethod(TOpenGLMethod); 410 RegisterDrawMethod(TOpenGLPBOMethod); 411 {$ENDIF} 412 RegisterDrawMethod(TDummyMethod); 413 end; 414 415 procedure TMainForm.RegisterDrawMethod(MethodClass: TDrawMethodClass); 416 begin 417 SetLength(DrawMethodClasses, Length(DrawMethodClasses) + 1); 418 DrawMethodClasses[High(DrawMethodClasses)] := MethodClass; 419 end; 420 402 421 end. 403 422
Note:
See TracChangeset
for help on using the changeset viewer.