mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 600763. Force initialization of OpenGL on OS X. r,a=joe
This is expected to regress Ts but the idea is to separate out the costs that we have little control of (like this one) from the costs that we have more control of.
This commit is contained in:
parent
a0affc6733
commit
4c2820c868
@ -36,6 +36,8 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <OpenGL/OpenGL.h>
|
||||
|
||||
#include "gfxPlatformMac.h"
|
||||
|
||||
#include "gfxImageSurface.h"
|
||||
@ -57,10 +59,34 @@
|
||||
|
||||
#include "qcms.h"
|
||||
|
||||
static void forceGLInit()
|
||||
{
|
||||
CGLPixelFormatAttribute attribs[] =
|
||||
{
|
||||
kCGLPFAAccelerated,
|
||||
kCGLPFAColorSize, (CGLPixelFormatAttribute)24,
|
||||
kCGLPFADepthSize, (CGLPixelFormatAttribute)16,
|
||||
kCGLPFADoubleBuffer,
|
||||
kCGLPFASupersample,
|
||||
(CGLPixelFormatAttribute)0
|
||||
};
|
||||
|
||||
CGLPixelFormatObj pixelFormatObj;
|
||||
GLint numPixelFormats;
|
||||
|
||||
CGLChoosePixelFormat (attribs, &pixelFormatObj, &numPixelFormats);
|
||||
}
|
||||
|
||||
|
||||
gfxPlatformMac::gfxPlatformMac()
|
||||
{
|
||||
mOSXVersion = 0;
|
||||
mFontAntiAliasingThreshold = ReadAntiAliasingThreshold();
|
||||
|
||||
/* We'll force the initialization of GL unconditionally so that we'll see
|
||||
the impact on Ts. Eventually, we should be able to do this on another
|
||||
thread bringing the cost down */
|
||||
forceGLInit();
|
||||
}
|
||||
|
||||
gfxPlatformMac::~gfxPlatformMac()
|
||||
|
Loading…
Reference in New Issue
Block a user