| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 bool Initialize(GLSurface::Format format) override; | 89 bool Initialize(GLSurface::Format format) override; |
| 90 void Destroy() override; | 90 void Destroy() override; |
| 91 bool Resize(const gfx::Size& size, | 91 bool Resize(const gfx::Size& size, |
| 92 float scale_factor, | 92 float scale_factor, |
| 93 bool has_alpha) override; | 93 bool has_alpha) override; |
| 94 bool Recreate() override; | 94 bool Recreate() override; |
| 95 bool IsOffscreen() override; | 95 bool IsOffscreen() override; |
| 96 gfx::SwapResult SwapBuffers() override; | 96 gfx::SwapResult SwapBuffers() override; |
| 97 gfx::Size GetSize() override; | 97 gfx::Size GetSize() override; |
| 98 EGLSurface GetHandle() override; | 98 EGLSurface GetHandle() override; |
| 99 bool SupportsSwapBuffersWithDamage() override; |
| 99 bool SupportsPostSubBuffer() override; | 100 bool SupportsPostSubBuffer() override; |
| 101 gfx::SwapResult SwapBuffersWithDamage(int x, |
| 102 int y, |
| 103 int width, |
| 104 int height) override; |
| 100 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; | 105 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; |
| 101 bool SupportsCommitOverlayPlanes() override; | 106 bool SupportsCommitOverlayPlanes() override; |
| 102 gfx::SwapResult CommitOverlayPlanes() override; | 107 gfx::SwapResult CommitOverlayPlanes() override; |
| 103 gfx::VSyncProvider* GetVSyncProvider() override; | 108 gfx::VSyncProvider* GetVSyncProvider() override; |
| 104 bool ScheduleOverlayPlane(int z_order, | 109 bool ScheduleOverlayPlane(int z_order, |
| 105 gfx::OverlayTransform transform, | 110 gfx::OverlayTransform transform, |
| 106 GLImage* image, | 111 GLImage* image, |
| 107 const gfx::Rect& bounds_rect, | 112 const gfx::Rect& bounds_rect, |
| 108 const gfx::RectF& crop_rect) override; | 113 const gfx::RectF& crop_rect) override; |
| 109 bool FlipsVertically() const override; | 114 bool FlipsVertically() const override; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 126 void OnSetSwapInterval(int interval) override; | 131 void OnSetSwapInterval(int interval) override; |
| 127 | 132 |
| 128 private: | 133 private: |
| 129 // Commit the |pending_overlays_| and clear the vector. Returns false if any | 134 // Commit the |pending_overlays_| and clear the vector. Returns false if any |
| 130 // fail to be committed. | 135 // fail to be committed. |
| 131 bool CommitAndClearPendingOverlays(); | 136 bool CommitAndClearPendingOverlays(); |
| 132 void UpdateSwapInterval(); | 137 void UpdateSwapInterval(); |
| 133 | 138 |
| 134 EGLSurface surface_; | 139 EGLSurface surface_; |
| 135 bool supports_post_sub_buffer_; | 140 bool supports_post_sub_buffer_; |
| 141 bool supports_swap_buffer_with_damage_; |
| 136 bool flips_vertically_; | 142 bool flips_vertically_; |
| 137 | 143 |
| 138 std::unique_ptr<gfx::VSyncProvider> vsync_provider_; | 144 std::unique_ptr<gfx::VSyncProvider> vsync_provider_; |
| 139 | 145 |
| 140 int swap_interval_; | 146 int swap_interval_; |
| 141 | 147 |
| 142 std::vector<GLSurfaceOverlay> pending_overlays_; | 148 std::vector<GLSurfaceOverlay> pending_overlays_; |
| 143 | 149 |
| 144 #if defined(OS_WIN) | 150 #if defined(OS_WIN) |
| 145 bool vsync_override_; | 151 bool vsync_override_; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 ~SurfacelessEGL() override; | 212 ~SurfacelessEGL() override; |
| 207 | 213 |
| 208 private: | 214 private: |
| 209 gfx::Size size_; | 215 gfx::Size size_; |
| 210 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 216 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
| 211 }; | 217 }; |
| 212 | 218 |
| 213 } // namespace gl | 219 } // namespace gl |
| 214 | 220 |
| 215 #endif // UI_GL_GL_SURFACE_EGL_H_ | 221 #endif // UI_GL_GL_SURFACE_EGL_H_ |
| OLD | NEW |