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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 virtual bool Resize(const gfx::Size& size) OVERRIDE; | 62 virtual bool Resize(const gfx::Size& size) OVERRIDE; |
63 virtual bool Recreate() OVERRIDE; | 63 virtual bool Recreate() OVERRIDE; |
64 virtual bool IsOffscreen() OVERRIDE; | 64 virtual bool IsOffscreen() OVERRIDE; |
65 virtual bool SwapBuffers() OVERRIDE; | 65 virtual bool SwapBuffers() OVERRIDE; |
66 virtual gfx::Size GetSize() OVERRIDE; | 66 virtual gfx::Size GetSize() OVERRIDE; |
67 virtual EGLSurface GetHandle() OVERRIDE; | 67 virtual EGLSurface GetHandle() OVERRIDE; |
68 virtual std::string GetExtensions() OVERRIDE; | 68 virtual std::string GetExtensions() OVERRIDE; |
69 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 69 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; |
70 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; | 70 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; |
71 | 71 |
| 72 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider. |
| 73 virtual bool Initialize(VSyncProvider* sync_provider); |
| 74 |
72 protected: | 75 protected: |
73 virtual ~NativeViewGLSurfaceEGL(); | 76 virtual ~NativeViewGLSurfaceEGL(); |
74 void SetHandle(EGLSurface surface); | 77 void SetHandle(EGLSurface surface); |
75 | 78 |
76 private: | 79 private: |
77 gfx::AcceleratedWidget window_; | 80 gfx::AcceleratedWidget window_; |
78 EGLSurface surface_; | 81 EGLSurface surface_; |
79 bool supports_post_sub_buffer_; | 82 bool supports_post_sub_buffer_; |
80 EGLConfig config_; | 83 EGLConfig config_; |
81 | 84 |
(...skipping 24 matching lines...) Expand all Loading... |
106 private: | 109 private: |
107 gfx::Size size_; | 110 gfx::Size size_; |
108 EGLSurface surface_; | 111 EGLSurface surface_; |
109 | 112 |
110 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); | 113 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); |
111 }; | 114 }; |
112 | 115 |
113 } // namespace gfx | 116 } // namespace gfx |
114 | 117 |
115 #endif // UI_GL_GL_SURFACE_EGL_H_ | 118 #endif // UI_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |