summaryrefslogtreecommitdiffstats
path: root/src/core/ozone/gl_ozone_glx_qt.h
blob: ca9ff47a35a562918b925c498b6277b2a1f01ee8 (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
// 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

#ifndef UI_OZONE_GLX_QT_H_
#define UI_OZONE_GLX_QT_H_

#include "ui/gl/gl_implementation.h"
#include "ui/ozone/public/gl_ozone.h"

namespace ui {

class GLOzoneGLXQt : public GLOzone {

public:
    GLOzoneGLXQt() {}
    ~GLOzoneGLXQt() override {}

    gl::GLDisplay *InitializeGLOneOffPlatform(uint64_t system_device_id) override;
    bool InitializeStaticGLBindings(const gl::GLImplementationParts &implementation) override;
    bool InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *display) override;
    void ShutdownGL(gl::GLDisplay *display) override;
    void SetDisabledExtensionsPlatform(
        const std::string& disabled_extensions) override;
    bool GetGLWindowSystemBindingInfo(
        const gl::GLVersionInfo &gl_info,
        gl::GLWindowSystemBindingInfo *info) override;

    scoped_refptr<gl::GLContext> CreateGLContext(
            gl::GLShareGroup* share_group,
            gl::GLSurface* compatible_surface,
            const gl::GLContextAttribs& attribs) override;

    scoped_refptr<gl::GLSurface> CreateViewGLSurface(
            gfx::AcceleratedWidget window) override;

    scoped_refptr<gl::GLSurface> CreateSurfacelessViewGLSurface(
            gfx::AcceleratedWidget window) override;

    scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface(
            const gfx::Size& size) override;
};

}  // namespace ui

#endif  // UI_OZONE_GLX_QT_H_