summaryrefslogtreecommitdiffstats
path: root/src/core/ozone/gl_ozone_egl_qt.h
blob: 59f25a72463eb3ef56d0044e61677c3d8c0f4b3b (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
// Copyright (C) 2017 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

#ifndef GL_OZONE_EGL_QT
#define GL_OZONE_EGL_QT

#if defined(USE_OZONE)

#include "ui/ozone/common/gl_ozone_egl.h"

namespace ui {

class GLOzoneEGLQt : public GLOzoneEGL {
public:
    gl::GLDisplay *InitializeGLOneOffPlatform(uint64_t system_device_id) override;
    bool InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *display) override;
    scoped_refptr<gl::GLSurface> CreateViewGLSurface(
            gfx::AcceleratedWidget window) override;
    scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface(
            const gfx::Size& size) override;

protected:
    // Returns native platform display handle. This is used to obtain the EGL
    // display connection for the native display.
    gl::EGLDisplayPlatform GetNativeDisplay() override;

    // Sets up GL bindings for the native surface.
    bool LoadGLES2Bindings(const gl::GLImplementationParts &implementation) override;
};

} // namespace ui

#endif // defined(USE_OZONE)

#endif // GL_OZONE_EGL_QT