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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual bool IsOffscreen() OVERRIDE; | 61 virtual bool IsOffscreen() OVERRIDE; |
62 virtual bool SwapBuffers() OVERRIDE; | 62 virtual bool SwapBuffers() OVERRIDE; |
63 virtual gfx::Size GetSize() OVERRIDE; | 63 virtual gfx::Size GetSize() OVERRIDE; |
64 virtual EGLSurface GetHandle() OVERRIDE; | 64 virtual EGLSurface GetHandle() OVERRIDE; |
65 virtual std::string GetExtensions() OVERRIDE; | 65 virtual std::string GetExtensions() OVERRIDE; |
66 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 66 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; |
67 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; | 67 virtual VSyncProvider* GetVSyncProvider() OVERRIDE; |
68 | 68 |
69 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider. | 69 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider. |
70 // Takes ownership of the VSyncProvider. | 70 // Takes ownership of the VSyncProvider. |
71 virtual bool Initialize(VSyncProvider* sync_provider); | 71 virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider); |
72 | 72 |
73 protected: | 73 protected: |
74 virtual ~NativeViewGLSurfaceEGL(); | 74 virtual ~NativeViewGLSurfaceEGL(); |
75 void SetHandle(EGLSurface surface); | 75 void SetHandle(EGLSurface surface); |
76 | 76 |
77 private: | 77 private: |
78 gfx::AcceleratedWidget window_; | 78 gfx::AcceleratedWidget window_; |
79 EGLSurface surface_; | 79 EGLSurface surface_; |
80 bool supports_post_sub_buffer_; | 80 bool supports_post_sub_buffer_; |
81 EGLConfig config_; | 81 EGLConfig config_; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 virtual ~SurfacelessEGL(); | 133 virtual ~SurfacelessEGL(); |
134 | 134 |
135 private: | 135 private: |
136 gfx::Size size_; | 136 gfx::Size size_; |
137 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 137 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
138 }; | 138 }; |
139 | 139 |
140 } // namespace gfx | 140 } // namespace gfx |
141 | 141 |
142 #endif // UI_GL_GL_SURFACE_EGL_H_ | 142 #endif // UI_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |