Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: ui/ozone/common/gl_ozone_egl.h

Issue 2270463002: Add OzoneGLImpl interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PUBLIC_GL_OZONE_EGL_H_
6 #define UI_OZONE_PUBLIC_GL_OZONE_EGL_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "ui/gl/gl_implementation.h"
11 #include "ui/ozone/public/gl_ozone.h"
12
13 namespace ui {
14
15 // A partial implementation of GLOzone for EGL.
16 class GLOzoneEGL : public GLOzone {
17 public:
18 GLOzoneEGL() {}
19 ~GLOzoneEGL() override {}
20
21 // GLOzone:
22 bool InitializeGLOneOffPlatform() override;
23 bool InitializeStaticGLBindings(gl::GLImplementation implementation) override;
24 void InitializeDebugGLBindings() override;
25 void ClearGLBindings() override;
26 bool GetGLWindowSystemBindingInfo(
27 gl::GLWindowSystemBindingInfo* info) override;
28 scoped_refptr<gl::GLContext> CreateGLContext(
29 gl::GLShareGroup* share_group,
30 gl::GLSurface* compatible_surface,
31 gl::GpuPreference gpu_preference) override;
32 scoped_refptr<gl::GLSurface> CreateViewGLSurface(
33 gfx::AcceleratedWidget window) override = 0;
34 scoped_refptr<gl::GLSurface> CreateSurfacelessViewGLSurface(
35 gfx::AcceleratedWidget window) override;
36 scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface(
37 const gfx::Size& size) override = 0;
38
39 protected:
40 // Returns native platform display handle. This is used to obtain the EGL
41 // display connection for the native display.
42 virtual intptr_t GetNativeDisplay() = 0;
43
44 // Sets up GL bindings for the native surface.
45 virtual bool LoadGLES2Bindings() = 0;
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(GLOzoneEGL);
49 };
50
51 } // namespace ui
52
53 #endif // UI_OZONE_PUBLIC_GL_OZONE_EGL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698