Delphi Paintbox Paint method is not updating image canvas[FMX]

  

I am working cross platform vnc project. Windows side is ok with VCL. But when i use FMX platform with same code, i having problems.
procedure TFrmScreenView.pbViewPaint(Sender: TObject);
begin
Client.DrawBitmap(pbView.Canvas);
end;

This code is updating to Paintbox Canvas for every new image packet from remote computer. This working on VCL no problem. But when i execute this project on FMX image repaint is not working. It just gets the first image and it doesn’t update.
procedure TFrmScreenView.pbViewPaint(Sender: TObject; Canvas: TCanvas);
begin
Client.DrawBitmap(pbView.Canvas);
end;

Client Code:
procedure TClient.DrawBitmap(Canvas: TCanvas);
begin
if assigned(Bitmap) then // Bitmap is global variable
begin
Canvas.DrawBitmap(Bitmap,RectF(0,0,Bitmap.Width, Bitmap.Height),
RectF(0,0,Bitmap.Width, Bitmap.Height),1,True);
end;
end;

If i use timer paintbox is updateing for every image package
procedure TScreenViewFrm.Timer1Timer(Sender: TObject);
begin
pbScreenView.Repaint;
end;

I have to use Timer for repaint on my code but i dont want this and not working stable.
***Note: When i resize ScreenView form Paint box is updating. Why?
Do you have any idea?
Example Capture
https://gyazo.com/f880c2f172b0106122ea711389bf1659

Comments are closed.