-
-
Notifications
You must be signed in to change notification settings - Fork 147
Description
At the moment all canvas implementations in Skia4Delphi use TSkBitmapHandle/TGrBitmapHandle to store bitmap data. These classes are a simple memory buffers, that are external to Skia engine. That is why when FMX needs to copy bitmap data, it uses simple buffer copy on CPU. See method TCanvas.DoCopyBitmap. This is bad for mobile devices and HiDPI screens. If bitmap data was stored in SKBitmap, you could override DoCopyBitmap and use one of SKBitmap constructors to copy data from source SKBitmap. Since copying operation will be happening inside Skia engine, it can optimize it in different ways. There are a lot of other situations where different Skia objects are constructed from buffers in TSkBitmapHandle/TGrBitmapHandle. If these buffers were SKBitmaps, a lot of such operations also could be optimized by Skia engine.