blob: 0d830451a0037ae8e95fba994534a3315b36cb42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "gl_surface_wgl_qt.h"
#if defined(OS_WIN)
#include "ui/gl/gl_surface_wgl.h"
namespace gl {
GLSurfaceWGLQt::GLSurfaceWGLQt(const gfx::Size& size)
: GLSurfaceQt(size),
m_surfaceBuffer(nullptr)
{
}
GLSurfaceWGLQt::~GLSurfaceWGLQt()
{
Destroy();
}
bool GLSurfaceWGLQt::InitializeOneOff()
{
return GLSurfaceWGL::InitializeOneOff();
}
bool GLSurfaceWGLQt::Initialize(GLSurfaceFormat format)
{
m_surfaceBuffer = new PbufferGLSurfaceWGL(m_size);
m_format = format;
return m_surfaceBuffer->Initialize(format);
}
void GLSurfaceWGLQt::Destroy()
{
m_surfaceBuffer = nullptr;
}
void *GLSurfaceWGLQt::GetHandle()
{
return m_surfaceBuffer->GetHandle();
}
void *GLSurfaceWGLQt::GetDisplay()
{
return m_surfaceBuffer->GetDisplay();
}
void *GLSurfaceWGLQt::GetConfig()
{
return m_surfaceBuffer->GetConfig();
}
} //namespace gl
#endif // defined(OS_WIN)
|