LCL: Return TSharedCustomBitmap as shared image class. TCustomBitmap assumes this as a descendant

This commit is contained in:
Marc 2021-10-12 22:14:21 +02:00
parent 9233efadf0
commit 4918dc89b0
2 changed files with 5 additions and 0 deletions

View File

@ -1368,6 +1368,7 @@ type
function GetPixelFormat: TPixelFormat; override;
function GetRawImagePtr: PRawImage; override;
function GetRawImageDescriptionPtr: PRawImageDescription; override;
class function GetSharedImageClass: TSharedRasterImageClass; override;
procedure HandleNeeded; override;
function InternalReleaseBitmapHandle: HBITMAP; override;
function InternalReleaseMaskHandle: HBITMAP; override;

View File

@ -503,4 +503,8 @@ begin
Result := @TSharedCustomBitmap(FSharedImage).FImage.Description;
end;
class function TCustomBitmap.GetSharedImageClass: TSharedRasterImageClass;
begin
Result := TSharedCustomBitmap;
end;