Răsfoiți Sursa

skia: less hints

mattias 1 an în urmă
părinte
comite
5a1f164cb3
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      demo/LCLSkiaPaintBox/LCL.Skia.pas

+ 3 - 1
demo/LCLSkiaPaintBox/LCL.Skia.pas

@@ -6,7 +6,7 @@ unit LCL.Skia;
 interface
 
 uses
-  Classes, SysUtils, Math, System.Math.Vectors, Types, System.UITypes, Controls, IntfGraphics,
+  Classes, SysUtils, Math, Types, System.UITypes, Controls, IntfGraphics,
   Graphics, LCLIntf, GraphType, System.Skia, SkiaFPC;
 
 type
@@ -945,6 +945,8 @@ end;
 
 function TSkRasterControlRender.TryRender(const ABackgroundBuffer: TBitmap; const AOpacity: Byte): Boolean;
 begin
+  if AOpacity=0 then exit;
+  if ABackgroundBuffer=nil then ;
   DoRender(FTarget.ClientWidth, FTarget.ClientHeight, FTarget.ScaleFactor, FTarget.Canvas{, ABackgroundBuffer, AOpacity});
   Result := True;
 end;