macOS: Remove alpha from default surface format
(This reverts commit 2ca1253b13).
This allowed use to avoid backing store RGB -> RGBA conversions
on the CPU back before macOS was layer backed. The conversion should be
GPU accelerated now, and we can return to the cross-platform default.
In addition, RGBA backingstores requires filling with transparent
pixels on each paint event, which causes increased CPU usage - often
for no reason if transparency effects are not used.
Change-Id: Ic795128b7e474b63f44f9f4f3526d0b205652e62
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
bb10
parent
4485f0d626
commit
07466a52c6
|
|
@ -223,14 +223,7 @@ QCocoaWindow::~QCocoaWindow()
|
|||
|
||||
QSurfaceFormat QCocoaWindow::format() const
|
||||
{
|
||||
QSurfaceFormat format = window()->requestedFormat();
|
||||
|
||||
// Upgrade the default surface format to include an alpha channel. The default RGB format
|
||||
// causes Cocoa to spend an unreasonable amount of time converting it to RGBA internally.
|
||||
if (format.alphaBufferSize() < 0)
|
||||
format.setAlphaBufferSize(8);
|
||||
|
||||
return format;
|
||||
return window()->requestedFormat();
|
||||
}
|
||||
|
||||
void QCocoaWindow::setGeometry(const QRect &rectIn)
|
||||
|
|
|
|||
Loading…
Reference in New Issue