| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_GL_GL_SURFACE_EGL_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_EGL_H_ |
| 6 #define UI_GFX_GL_GL_SURFACE_EGL_H_ | 6 #define UI_GFX_GL_GL_SURFACE_EGL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Implement GLSurface. | 37 // Implement GLSurface. |
| 38 virtual EGLDisplay GetDisplay(); | 38 virtual EGLDisplay GetDisplay(); |
| 39 virtual EGLConfig GetConfig(); | 39 virtual EGLConfig GetConfig(); |
| 40 | 40 |
| 41 static bool InitializeOneOff(); | 41 static bool InitializeOneOff(); |
| 42 static EGLDisplay GetHardwareDisplay(); | 42 static EGLDisplay GetHardwareDisplay(); |
| 43 static EGLDisplay GetSoftwareDisplay(); | 43 static EGLDisplay GetSoftwareDisplay(); |
| 44 static EGLNativeDisplayType GetNativeDisplay(); | 44 static EGLNativeDisplayType GetNativeDisplay(); |
| 45 | 45 |
| 46 protected: | 46 protected: |
| 47 bool software_; | 47 bool software_; |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); | 50 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 // Encapsulates an EGL surface bound to a view. | 53 // Encapsulates an EGL surface bound to a view. |
| 54 class NativeViewGLSurfaceEGL : public GLSurfaceEGL { | 54 class NativeViewGLSurfaceEGL : public GLSurfaceEGL { |
| 55 public: | 55 public: |
| 56 NativeViewGLSurfaceEGL(bool software, gfx::PluginWindowHandle window); | 56 NativeViewGLSurfaceEGL(bool software, gfx::PluginWindowHandle window); |
| 57 virtual ~NativeViewGLSurfaceEGL(); | 57 virtual ~NativeViewGLSurfaceEGL(); |
| 58 | 58 |
| 59 // Implement GLSurface. | 59 // Implement GLSurface. |
| 60 virtual bool Initialize(); | 60 virtual bool Initialize(); |
| 61 virtual void Destroy(); | 61 virtual void Destroy(); |
| 62 virtual bool IsOffscreen(); | 62 virtual bool IsOffscreen(); |
| 63 virtual bool SwapBuffers(); | 63 virtual bool SwapBuffers(); |
| 64 virtual gfx::Size GetSize(); | 64 virtual gfx::Size GetSize(); |
| 65 virtual EGLSurface GetHandle(); | 65 virtual EGLSurface GetHandle(); |
| 66 virtual bool SupportsPostSubBuffer(); |
| 67 virtual bool PostSubBuffer(int x, int y, int width, int height); |
| 66 | 68 |
| 67 private: | 69 private: |
| 68 gfx::PluginWindowHandle window_; | 70 gfx::PluginWindowHandle window_; |
| 69 EGLSurface surface_; | 71 EGLSurface surface_; |
| 72 bool supports_post_sub_buffer_; |
| 70 | 73 |
| 71 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); | 74 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 // Encapsulates a pbuffer EGL surface. | 77 // Encapsulates a pbuffer EGL surface. |
| 75 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { | 78 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { |
| 76 public: | 79 public: |
| 77 PbufferGLSurfaceEGL(bool software, const gfx::Size& size); | 80 PbufferGLSurfaceEGL(bool software, const gfx::Size& size); |
| 78 virtual ~PbufferGLSurfaceEGL(); | 81 virtual ~PbufferGLSurfaceEGL(); |
| 79 | 82 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 90 private: | 93 private: |
| 91 gfx::Size size_; | 94 gfx::Size size_; |
| 92 EGLSurface surface_; | 95 EGLSurface surface_; |
| 93 | 96 |
| 94 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); | 97 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); |
| 95 }; | 98 }; |
| 96 | 99 |
| 97 } // namespace gfx | 100 } // namespace gfx |
| 98 | 101 |
| 99 #endif // UI_GFX_GL_GL_SURFACE_EGL_H_ | 102 #endif // UI_GFX_GL_GL_SURFACE_EGL_H_ |
| OLD | NEW |