blob: 7ac55979a868f592c43ccb5330af4b2c703ea09a (
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
|
// 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(bool supports_angle,
std::vector<gl::DisplayType> init_displays,
gl::GpuPreference gpu_preference) override;
bool InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *display) override;
scoped_refptr<gl::GLSurface> CreateViewGLSurface(
gl::GLDisplay *display,
gfx::AcceleratedWidget window) override;
scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface(
gl::GLDisplay *display,
const gfx::Size &size) override;
bool CanImportNativePixmap() override;
std::unique_ptr<NativePixmapGLBinding> ImportNativePixmap(
scoped_refptr<gfx::NativePixmap> pixmap,
gfx::BufferFormat plane_format,
gfx::BufferPlane plane,
gfx::Size plane_size,
const gfx::ColorSpace &color_space,
GLenum target,
GLuint texture_id) 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
|