OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_GL_GL_SURFACE_EGL_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_EGL_H_ |
6 #define UI_GFX_GL_GL_SURFACE_EGL_H_ | 6 #define UI_GFX_GL_GL_SURFACE_EGL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 16 matching lines...) Expand all Loading... |
27 #endif | 27 #endif |
28 | 28 |
29 namespace gfx { | 29 namespace gfx { |
30 | 30 |
31 // Interface for EGL surface. | 31 // Interface for EGL surface. |
32 class GL_EXPORT GLSurfaceEGL : public GLSurface { | 32 class GL_EXPORT GLSurfaceEGL : public GLSurface { |
33 public: | 33 public: |
34 GLSurfaceEGL(); | 34 GLSurfaceEGL(); |
35 virtual ~GLSurfaceEGL(); | 35 virtual ~GLSurfaceEGL(); |
36 | 36 |
| 37 // Implement GLSurface. |
| 38 virtual EGLDisplay GetDisplay(); |
| 39 virtual EGLConfig GetConfig(); |
| 40 |
37 static bool InitializeOneOff(); | 41 static bool InitializeOneOff(); |
38 EGLDisplay GetDisplay(); | |
39 EGLConfig GetConfig(); | |
40 static EGLDisplay GetHardwareDisplay(); | 42 static EGLDisplay GetHardwareDisplay(); |
41 static EGLDisplay GetSoftwareDisplay(); | 43 static EGLDisplay GetSoftwareDisplay(); |
42 static EGLNativeDisplayType GetNativeDisplay(); | 44 static EGLNativeDisplayType GetNativeDisplay(); |
43 | 45 |
44 protected: | 46 protected: |
45 bool software_; | 47 bool software_; |
46 | 48 |
47 private: | 49 private: |
48 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); | 50 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); |
49 }; | 51 }; |
(...skipping 24 matching lines...) Expand all Loading... |
74 public: | 76 public: |
75 PbufferGLSurfaceEGL(bool software, const gfx::Size& size); | 77 PbufferGLSurfaceEGL(bool software, const gfx::Size& size); |
76 virtual ~PbufferGLSurfaceEGL(); | 78 virtual ~PbufferGLSurfaceEGL(); |
77 | 79 |
78 // Implement GLSurface. | 80 // Implement GLSurface. |
79 virtual bool Initialize(); | 81 virtual bool Initialize(); |
80 virtual void Destroy(); | 82 virtual void Destroy(); |
81 virtual bool IsOffscreen(); | 83 virtual bool IsOffscreen(); |
82 virtual bool SwapBuffers(); | 84 virtual bool SwapBuffers(); |
83 virtual gfx::Size GetSize(); | 85 virtual gfx::Size GetSize(); |
| 86 virtual bool Resize(const gfx::Size& size); |
84 virtual EGLSurface GetHandle(); | 87 virtual EGLSurface GetHandle(); |
| 88 virtual void* GetShareHandle(); |
85 | 89 |
86 private: | 90 private: |
87 gfx::Size size_; | 91 gfx::Size size_; |
88 EGLSurface surface_; | 92 EGLSurface surface_; |
89 | 93 |
90 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); | 94 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); |
91 }; | 95 }; |
92 | 96 |
93 } // namespace gfx | 97 } // namespace gfx |
94 | 98 |
95 #endif // UI_GFX_GL_GL_SURFACE_EGL_H_ | 99 #endif // UI_GFX_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |