The base data structure is BGRA data. When you access to the Bitmap property, it is converted to a TBitmap for convenience. You can make changes to the Bitmap canvas, but then it must be updated to the BGRA data.
There are two possibilites :
- either a DIB section is possible which means that a TBitmap can be mapped directly to the BGRA data.
- or it's not possible or not implemented, then there is a copy between BGRA data and Bitmap handle. In this case, LoadFromBitmapIfNeeded loads the data from the Bitmap handle. And InvalidateBitmap signals that the TBitmap object must be built again, that the Bitmap handle is no longer updated.