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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 private: | 77 private: |
78 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); | 78 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); |
79 }; | 79 }; |
80 | 80 |
81 // Encapsulates an EGL surface bound to a view. | 81 // Encapsulates an EGL surface bound to a view. |
82 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { | 82 class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL { |
83 public: | 83 public: |
84 explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window); | 84 explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window); |
85 | 85 |
86 // Implement GLSurface. | 86 // Implement GLSurface. |
87 bool Initialize() override; | 87 using GLSurfaceEGL::Initialize; |
88 bool Initialize(GLSurface::Format format) override; | 88 bool Initialize(GLSurface::Format format) override; |
89 void Destroy() override; | 89 void Destroy() override; |
90 bool Resize(const gfx::Size& size, | 90 bool Resize(const gfx::Size& size, |
91 float scale_factor, | 91 float scale_factor, |
92 bool has_alpha) override; | 92 bool has_alpha) override; |
93 bool Recreate() override; | 93 bool Recreate() override; |
94 bool IsOffscreen() override; | 94 bool IsOffscreen() override; |
95 gfx::SwapResult SwapBuffers() override; | 95 gfx::SwapResult SwapBuffers() override; |
96 gfx::Size GetSize() override; | 96 gfx::Size GetSize() override; |
97 EGLSurface GetHandle() override; | 97 EGLSurface GetHandle() override; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); | 151 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); |
152 }; | 152 }; |
153 | 153 |
154 // Encapsulates a pbuffer EGL surface. | 154 // Encapsulates a pbuffer EGL surface. |
155 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { | 155 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { |
156 public: | 156 public: |
157 explicit PbufferGLSurfaceEGL(const gfx::Size& size); | 157 explicit PbufferGLSurfaceEGL(const gfx::Size& size); |
158 | 158 |
159 // Implement GLSurface. | 159 // Implement GLSurface. |
| 160 bool Initialize() override; |
160 bool Initialize(GLSurface::Format format) override; | 161 bool Initialize(GLSurface::Format format) override; |
161 void Destroy() override; | 162 void Destroy() override; |
162 bool IsOffscreen() override; | 163 bool IsOffscreen() override; |
163 gfx::SwapResult SwapBuffers() override; | 164 gfx::SwapResult SwapBuffers() override; |
164 gfx::Size GetSize() override; | 165 gfx::Size GetSize() override; |
165 bool Resize(const gfx::Size& size, | 166 bool Resize(const gfx::Size& size, |
166 float scale_factor, | 167 float scale_factor, |
167 bool has_alpha) override; | 168 bool has_alpha) override; |
168 EGLSurface GetHandle() override; | 169 EGLSurface GetHandle() override; |
169 void* GetShareHandle() override; | 170 void* GetShareHandle() override; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 ~SurfacelessEGL() override; | 203 ~SurfacelessEGL() override; |
203 | 204 |
204 private: | 205 private: |
205 gfx::Size size_; | 206 gfx::Size size_; |
206 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 207 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
207 }; | 208 }; |
208 | 209 |
209 } // namespace gfx | 210 } // namespace gfx |
210 | 211 |
211 #endif // UI_GL_GL_SURFACE_EGL_H_ | 212 #endif // UI_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |