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

Side by Side Diff: ui/gl/gl_surface_egl.h

Issue 1051253008: gpu: Upgrade to new ANGLE Platform Display init. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for ChromeOS build Created 5 years, 8 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
« no previous file with comments | « ui/gl/gl_bindings.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GL_GL_SURFACE_EGL_H_ 5 #ifndef UI_GL_GL_SURFACE_EGL_H_
6 #define UI_GL_GL_SURFACE_EGL_H_ 6 #define UI_GL_GL_SURFACE_EGL_H_
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 16 matching lines...) Expand all
27 class GL_EXPORT GLSurfaceEGL : public GLSurface { 27 class GL_EXPORT GLSurfaceEGL : public GLSurface {
28 public: 28 public:
29 GLSurfaceEGL(); 29 GLSurfaceEGL();
30 30
31 // Implement GLSurface. 31 // Implement GLSurface.
32 void DestroyAndTerminateDisplay() override; 32 void DestroyAndTerminateDisplay() override;
33 EGLDisplay GetDisplay() override; 33 EGLDisplay GetDisplay() override;
34 34
35 static bool InitializeOneOff(); 35 static bool InitializeOneOff();
36 static EGLDisplay GetHardwareDisplay(); 36 static EGLDisplay GetHardwareDisplay();
37 static EGLDisplay InitializeDisplay();
37 static EGLNativeDisplayType GetNativeDisplay(); 38 static EGLNativeDisplayType GetNativeDisplay();
38 39
39 // These aren't particularly tied to surfaces, but since we already 40 // These aren't particularly tied to surfaces, but since we already
40 // have the static InitializeOneOff here, it's easiest to reuse its 41 // have the static InitializeOneOff here, it's easiest to reuse its
41 // initialization guards. 42 // initialization guards.
42 static const char* GetEGLExtensions(); 43 static const char* GetEGLExtensions();
43 static bool HasEGLExtension(const char* name); 44 static bool HasEGLExtension(const char* name);
44 static bool IsCreateContextRobustnessSupported(); 45 static bool IsCreateContextRobustnessSupported();
45 static bool IsEGLSurfacelessContextSupported(); 46 static bool IsEGLSurfacelessContextSupported();
46 47
47 protected: 48 protected:
48 ~GLSurfaceEGL() override; 49 ~GLSurfaceEGL() override;
49 50
50 private: 51 private:
51 #if defined(OS_WIN)
52 friend struct DriverEGL;
53 static EGLDisplay GetPlatformDisplay(EGLNativeDisplayType native_display);
54 #endif
55
56 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); 52 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL);
57 }; 53 };
58 54
59 // Encapsulates an EGL surface bound to a view. 55 // Encapsulates an EGL surface bound to a view.
60 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { 56 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
61 public: 57 public:
62 explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window); 58 explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window);
63 59
64 // Implement GLSurface. 60 // Implement GLSurface.
65 EGLConfig GetConfig() override; 61 EGLConfig GetConfig() override;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 ~SurfacelessEGL() override; 153 ~SurfacelessEGL() override;
158 154
159 private: 155 private:
160 gfx::Size size_; 156 gfx::Size size_;
161 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); 157 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL);
162 }; 158 };
163 159
164 } // namespace gfx 160 } // namespace gfx
165 161
166 #endif // UI_GL_GL_SURFACE_EGL_H_ 162 #endif // UI_GL_GL_SURFACE_EGL_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings.cc ('k') | ui/gl/gl_surface_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698