| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 bool ScheduleOverlayPlane(int z_order, | 91 bool ScheduleOverlayPlane(int z_order, |
| 92 OverlayTransform transform, | 92 OverlayTransform transform, |
| 93 gl::GLImage* image, | 93 gl::GLImage* image, |
| 94 const Rect& bounds_rect, | 94 const Rect& bounds_rect, |
| 95 const RectF& crop_rect) override; | 95 const RectF& crop_rect) override; |
| 96 | 96 |
| 97 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider. | 97 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider. |
| 98 // Takes ownership of the VSyncProvider. | 98 // Takes ownership of the VSyncProvider. |
| 99 virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider); | 99 virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider); |
| 100 | 100 |
| 101 // Takes care of the platform dependant bits, of any, for creating the window. |
| 102 virtual bool InitializeNativeWindow(); |
| 103 |
| 101 protected: | 104 protected: |
| 102 ~NativeViewGLSurfaceEGL() override; | 105 ~NativeViewGLSurfaceEGL() override; |
| 103 | 106 |
| 104 EGLNativeWindowType window_; | 107 EGLNativeWindowType window_; |
| 108 EGLConfig config_; |
| 109 gfx::Size size_; |
| 105 | 110 |
| 106 void OnSetSwapInterval(int interval) override; | 111 void OnSetSwapInterval(int interval) override; |
| 107 | 112 |
| 108 private: | 113 private: |
| 109 EGLSurface surface_; | 114 EGLSurface surface_; |
| 110 bool supports_post_sub_buffer_; | 115 bool supports_post_sub_buffer_; |
| 111 EGLConfig config_; | |
| 112 gfx::Size size_; | |
| 113 | 116 |
| 114 scoped_ptr<VSyncProvider> vsync_provider_; | 117 scoped_ptr<VSyncProvider> vsync_provider_; |
| 115 | 118 |
| 116 int swap_interval_; | 119 int swap_interval_; |
| 117 | 120 |
| 118 #if defined(OS_WIN) | 121 #if defined(OS_WIN) |
| 119 bool vsync_override_; | 122 bool vsync_override_; |
| 120 | 123 |
| 121 unsigned int swap_generation_; | 124 unsigned int swap_generation_; |
| 122 static unsigned int current_swap_generation_; | 125 static unsigned int current_swap_generation_; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 ~SurfacelessEGL() override; | 179 ~SurfacelessEGL() override; |
| 177 | 180 |
| 178 private: | 181 private: |
| 179 gfx::Size size_; | 182 gfx::Size size_; |
| 180 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 183 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
| 181 }; | 184 }; |
| 182 | 185 |
| 183 } // namespace gfx | 186 } // namespace gfx |
| 184 | 187 |
| 185 #endif // UI_GL_GL_SURFACE_EGL_H_ | 188 #endif // UI_GL_GL_SURFACE_EGL_H_ |
| OLD | NEW |