| 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 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 EGLNativeWindowType window, | 55 EGLNativeWindowType window, |
| 56 const gfx::SurfaceConfiguration requested_configuration); | 56 const gfx::SurfaceConfiguration requested_configuration); |
| 57 | 57 |
| 58 // Implement GLSurface. | 58 // Implement GLSurface. |
| 59 EGLConfig GetConfig() override; | 59 EGLConfig GetConfig() override; |
| 60 bool Initialize() override; | 60 bool Initialize() override; |
| 61 void Destroy() override; | 61 void Destroy() override; |
| 62 bool Resize(const gfx::Size& size) override; | 62 bool Resize(const gfx::Size& size) override; |
| 63 bool Recreate() override; | 63 bool Recreate() override; |
| 64 bool IsOffscreen() override; | 64 bool IsOffscreen() override; |
| 65 bool SwapBuffers() override; | 65 gfx::SwapResult SwapBuffers() override; |
| 66 gfx::Size GetSize() override; | 66 gfx::Size GetSize() override; |
| 67 EGLSurface GetHandle() override; | 67 EGLSurface GetHandle() override; |
| 68 bool SupportsPostSubBuffer() override; | 68 bool SupportsPostSubBuffer() override; |
| 69 bool PostSubBuffer(int x, int y, int width, int height) override; | 69 gfx::SwapResult PostSubBuffer(int x, int y, int width, int height) override; |
| 70 VSyncProvider* GetVSyncProvider() override; | 70 VSyncProvider* GetVSyncProvider() override; |
| 71 | 71 |
| 72 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider. | 72 // Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider. |
| 73 // Takes ownership of the VSyncProvider. | 73 // Takes ownership of the VSyncProvider. |
| 74 virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider); | 74 virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider); |
| 75 | 75 |
| 76 protected: | 76 protected: |
| 77 ~NativeViewGLSurfaceEGL() override; | 77 ~NativeViewGLSurfaceEGL() override; |
| 78 | 78 |
| 79 EGLNativeWindowType window_; | 79 EGLNativeWindowType window_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 97 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { | 97 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { |
| 98 public: | 98 public: |
| 99 PbufferGLSurfaceEGL(const gfx::Size& size, | 99 PbufferGLSurfaceEGL(const gfx::Size& size, |
| 100 const gfx::SurfaceConfiguration requested_configuration); | 100 const gfx::SurfaceConfiguration requested_configuration); |
| 101 | 101 |
| 102 // Implement GLSurface. | 102 // Implement GLSurface. |
| 103 EGLConfig GetConfig() override; | 103 EGLConfig GetConfig() override; |
| 104 bool Initialize() override; | 104 bool Initialize() override; |
| 105 void Destroy() override; | 105 void Destroy() override; |
| 106 bool IsOffscreen() override; | 106 bool IsOffscreen() override; |
| 107 bool SwapBuffers() override; | 107 gfx::SwapResult SwapBuffers() override; |
| 108 gfx::Size GetSize() override; | 108 gfx::Size GetSize() override; |
| 109 bool Resize(const gfx::Size& size) override; | 109 bool Resize(const gfx::Size& size) override; |
| 110 EGLSurface GetHandle() override; | 110 EGLSurface GetHandle() override; |
| 111 void* GetShareHandle() override; | 111 void* GetShareHandle() override; |
| 112 | 112 |
| 113 protected: | 113 protected: |
| 114 ~PbufferGLSurfaceEGL() override; | 114 ~PbufferGLSurfaceEGL() override; |
| 115 | 115 |
| 116 private: | 116 private: |
| 117 gfx::Size size_; | 117 gfx::Size size_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 128 public: | 128 public: |
| 129 SurfacelessEGL(const gfx::Size& size, | 129 SurfacelessEGL(const gfx::Size& size, |
| 130 SurfaceConfiguration requested_configuration); | 130 SurfaceConfiguration requested_configuration); |
| 131 | 131 |
| 132 // Implement GLSurface. | 132 // Implement GLSurface. |
| 133 EGLConfig GetConfig() override; | 133 EGLConfig GetConfig() override; |
| 134 bool Initialize() override; | 134 bool Initialize() override; |
| 135 void Destroy() override; | 135 void Destroy() override; |
| 136 bool IsOffscreen() override; | 136 bool IsOffscreen() override; |
| 137 bool IsSurfaceless() const override; | 137 bool IsSurfaceless() const override; |
| 138 bool SwapBuffers() override; | 138 gfx::SwapResult SwapBuffers() override; |
| 139 gfx::Size GetSize() override; | 139 gfx::Size GetSize() override; |
| 140 bool Resize(const gfx::Size& size) override; | 140 bool Resize(const gfx::Size& size) override; |
| 141 EGLSurface GetHandle() override; | 141 EGLSurface GetHandle() override; |
| 142 void* GetShareHandle() override; | 142 void* GetShareHandle() override; |
| 143 | 143 |
| 144 protected: | 144 protected: |
| 145 ~SurfacelessEGL() override; | 145 ~SurfacelessEGL() override; |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 gfx::Size size_; | 148 gfx::Size size_; |
| 149 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); | 149 DISALLOW_COPY_AND_ASSIGN(SurfacelessEGL); |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 } // namespace gfx | 152 } // namespace gfx |
| 153 | 153 |
| 154 #endif // UI_GL_GL_SURFACE_EGL_H_ | 154 #endif // UI_GL_GL_SURFACE_EGL_H_ |
| OLD | NEW |