Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
bc2276aa
Commit
bc2276aa
authored
Nov 10, 2020
by
Yaroslav Sidlovsky
💬
Browse files
Fix pixel format RGB32 is some cases (NVidia proprietary driver)
BUG: 408606
parent
dc8477c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcms/kfontinst/lib/FcEngine.cpp
View file @
bc2276aa
...
...
@@ -589,6 +589,14 @@ QImage CFcEngine::Xft::toImage(int w, int h) const
if
(
!
xImage
)
{
return
QImage
();
}
if
(
imageFormat
==
QImage
::
Format_RGB32
)
{
// the RGB32 format requires data format 0xffRRGGBB, ensure that this fourth byte really is 0xff
// (i.e. when using NVidia proprietary driver)
auto
lData
=
reinterpret_cast
<
quint32
*>
(
xImage
->
data
);
for
(
size_t
iIter
=
0
;
iIter
<
(
xImage
->
stride
/
4
)
*
xImage
->
height
;
iIter
++
)
{
lData
[
iIter
]
|=
0xff000000
;
}
}
return
QImage
(
xImage
->
data
,
xImage
->
width
,
xImage
->
height
,
xImage
->
stride
,
imageFormat
,
&
cleanupXImage
,
xImage
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment