| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 static const char* GetEGLExtensions(); | 65 static const char* GetEGLExtensions(); |
| 66 static bool HasEGLExtension(const char* name); | 66 static bool HasEGLExtension(const char* name); |
| 67 static bool IsCreateContextRobustnessSupported(); | 67 static bool IsCreateContextRobustnessSupported(); |
| 68 static bool IsEGLSurfacelessContextSupported(); | 68 static bool IsEGLSurfacelessContextSupported(); |
| 69 static bool IsDirectCompositionSupported(); | 69 static bool IsDirectCompositionSupported(); |
| 70 | 70 |
| 71 protected: | 71 protected: |
| 72 ~GLSurfaceEGL() override; | 72 ~GLSurfaceEGL() override; |
| 73 | 73 |
| 74 EGLConfig config_; | 74 EGLConfig config_; |
| 75 GLSurface::Format format_; | |
| 76 | 75 |
| 77 private: | 76 private: |
| 78 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); | 77 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); |
| 79 }; | 78 }; |
| 80 | 79 |
| 81 // Encapsulates an EGL surface bound to a view. | 80 // Encapsulates an EGL surface bound to a view. |
| 82 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { | 81 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { |
| 83 public: | 82 public: |
| 84 explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window); | 83 explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window); |
| 85 | 84 |
| 86 // Implement GLSurface. | 85 // Implement GLSurface. |
| 87 bool Initialize() override; | 86 using GLSurface::Initialize; |
| 88 bool Initialize(GLSurface::Format format) override; | 87 bool Initialize(GLSurface::Format format) override; |
| 89 void Destroy() override; | 88 void Destroy() override; |
| 90 bool Resize(const gfx::Size& size, | 89 bool Resize(const gfx::Size& size, |
| 91 float scale_factor, | 90 float scale_factor, |
| 92 bool has_alpha) override; | 91 bool has_alpha) override; |
| 93 bool Recreate() override; | 92 bool Recreate() override; |
| 94 bool IsOffscreen() override; | 93 bool IsOffscreen() override; |
| 95 gfx::SwapResult SwapBuffers() override; | 94 gfx::SwapResult SwapBuffers() override; |
| 96 gfx::Size GetSize() override; | 95 gfx::Size GetSize() override; |
| 97 EGLSurface GetHandle() override; | 96 EGLSurface GetHandle() override; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 ~SurfacelessEGL() override; | 201 ~SurfacelessEGL() override; |
| 203 | 202 |
| 204 private: | 203 private: |
| 205 gfx::Size size_; | 204 gfx::Size size_; |
| 206 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 205 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
| 207 }; | 206 }; |
| 208 | 207 |
| 209 } // namespace gfx | 208 } // namespace gfx |
| 210 | 209 |
| 211 #endif // UI_GL_GL_SURFACE_EGL_H_ | 210 #endif // UI_GL_GL_SURFACE_EGL_H_ |
| OLD | NEW |