mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 09:21:10 +02:00
Minor improvement to the X11 screen format code
git-svn-id: trunk@36722 -
This commit is contained in:
parent
c74dcfc14e
commit
69b548980c
@ -159,7 +159,6 @@ var
|
|||||||
DW,DH,DWMM,DHMM: culong;
|
DW,DH,DWMM,DHMM: culong;
|
||||||
I: Integer;
|
I: Integer;
|
||||||
APVisual: PVisual;
|
APVisual: PVisual;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{$ifdef Verbose_CDWS}
|
{$ifdef Verbose_CDWS}
|
||||||
// DebugLn('TCDWidgetSet.AppInit');
|
// DebugLn('TCDWidgetSet.AppInit');
|
||||||
@ -203,9 +202,12 @@ begin
|
|||||||
ScreenInfo.ColorDepth:= XDefaultDepth(FDisplay,FScreen);
|
ScreenInfo.ColorDepth:= XDefaultDepth(FDisplay,FScreen);
|
||||||
ScreenInfo.Initialized:= True;
|
ScreenInfo.Initialized:= True;
|
||||||
|
|
||||||
// Pixmap Format
|
// Screen Pixmap Format
|
||||||
|
// ScreenFormat is just a hint to tell controls to use the screen format
|
||||||
|
// because using the same format as the screen increases the speed of canvas copy operations
|
||||||
APVisual:= XDefaultVisual(FDisplay,FScreen);
|
APVisual:= XDefaultVisual(FDisplay,FScreen);
|
||||||
FVisual:= APVisual^;
|
FVisual:= APVisual^;
|
||||||
|
ScreenFormat := clfARGB32; // Standard value with alpha blending support if we don't find a enum which matches the screen format
|
||||||
if (ScreenInfo.ColorDepth = 16) then ScreenFormat:= clfRGB16_R5G6B5
|
if (ScreenInfo.ColorDepth = 16) then ScreenFormat:= clfRGB16_R5G6B5
|
||||||
else if (ScreenInfo.ColorDepth = 24) then begin
|
else if (ScreenInfo.ColorDepth = 24) then begin
|
||||||
if (FVisual.blue_mask = $FF) and
|
if (FVisual.blue_mask = $FF) and
|
||||||
@ -231,7 +233,6 @@ begin
|
|||||||
(FVisual.blue_mask = $FF000000) then
|
(FVisual.blue_mask = $FF000000) then
|
||||||
ScreenFormat:= clfARGB32;
|
ScreenFormat:= clfARGB32;
|
||||||
end;
|
end;
|
||||||
//ScreenFormat := clfBGR24;
|
|
||||||
|
|
||||||
//if (not (woX11SkipWMHints in WindowOptions)) and (woWindow in WindowOptions) then
|
//if (not (woX11SkipWMHints in WindowOptions)) and (woWindow in WindowOptions) then
|
||||||
//begin
|
//begin
|
||||||
|
Loading…
Reference in New Issue
Block a user