From be59761cc4096d9bcb01a61a7837e84771593442 Mon Sep 17 00:00:00 2001 From: Marc Date: Tue, 12 Oct 2021 22:14:21 +0200 Subject: [PATCH] LCL: Return TSharedCustomBitmap as shared image class. TCustomBitmap assumes this as a descendant (cherry picked from commit 4918dc89b0c8d0c03dcd79065589728e982175a3) --- lcl/graphics.pp | 1 + lcl/include/custombitmap.inc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lcl/graphics.pp b/lcl/graphics.pp index f3add3dd7d..d9c1f26513 100644 --- a/lcl/graphics.pp +++ b/lcl/graphics.pp @@ -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; diff --git a/lcl/include/custombitmap.inc b/lcl/include/custombitmap.inc index 5745b1ad4b..f932d22d12 100644 --- a/lcl/include/custombitmap.inc +++ b/lcl/include/custombitmap.inc @@ -503,4 +503,8 @@ begin Result := @TSharedCustomBitmap(FSharedImage).FImage.Description; end; +class function TCustomBitmap.GetSharedImageClass: TSharedRasterImageClass; +begin + Result := TSharedCustomBitmap; +end;