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_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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 protected: | 49 protected: |
50 bool software_; | 50 bool software_; |
51 | 51 |
52 private: | 52 private: |
53 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); | 53 DISALLOW_COPY_AND_ASSIGN(GLSurfaceEGL); |
54 }; | 54 }; |
55 | 55 |
56 // Encapsulates an EGL surface bound to a view. | 56 // Encapsulates an EGL surface bound to a view. |
57 class NativeViewGLSurfaceEGL : public GLSurfaceEGL { | 57 class NativeViewGLSurfaceEGL : public GLSurfaceEGL { |
58 public: | 58 public: |
59 NativeViewGLSurfaceEGL(bool software, gfx::PluginWindowHandle window); | 59 NativeViewGLSurfaceEGL(bool software, gfx::AcceleratedWidget window); |
60 virtual ~NativeViewGLSurfaceEGL(); | 60 virtual ~NativeViewGLSurfaceEGL(); |
61 | 61 |
62 // Implement GLSurface. | 62 // Implement GLSurface. |
63 virtual bool Initialize() OVERRIDE; | 63 virtual bool Initialize() OVERRIDE; |
64 virtual void Destroy() OVERRIDE; | 64 virtual void Destroy() OVERRIDE; |
65 virtual bool IsOffscreen() OVERRIDE; | 65 virtual bool IsOffscreen() OVERRIDE; |
66 virtual bool SwapBuffers() OVERRIDE; | 66 virtual bool SwapBuffers() OVERRIDE; |
67 virtual gfx::Size GetSize() OVERRIDE; | 67 virtual gfx::Size GetSize() OVERRIDE; |
68 virtual EGLSurface GetHandle() OVERRIDE; | 68 virtual EGLSurface GetHandle() OVERRIDE; |
69 virtual std::string GetExtensions() OVERRIDE; | 69 virtual std::string GetExtensions() OVERRIDE; |
70 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; | 70 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; |
71 | 71 |
72 protected: | 72 protected: |
73 void SetHandle(EGLSurface surface); | 73 void SetHandle(EGLSurface surface); |
74 | 74 |
75 private: | 75 private: |
76 gfx::PluginWindowHandle window_; | 76 gfx::AcceleratedWidget window_; |
77 EGLSurface surface_; | 77 EGLSurface surface_; |
78 bool supports_post_sub_buffer_; | 78 bool supports_post_sub_buffer_; |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); | 80 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceEGL); |
81 }; | 81 }; |
82 | 82 |
83 // Encapsulates a pbuffer EGL surface. | 83 // Encapsulates a pbuffer EGL surface. |
84 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { | 84 class GL_EXPORT PbufferGLSurfaceEGL : public GLSurfaceEGL { |
85 public: | 85 public: |
86 PbufferGLSurfaceEGL(bool software, const gfx::Size& size); | 86 PbufferGLSurfaceEGL(bool software, const gfx::Size& size); |
(...skipping 12 matching lines...) Expand all Loading... |
99 private: | 99 private: |
100 gfx::Size size_; | 100 gfx::Size size_; |
101 EGLSurface surface_; | 101 EGLSurface surface_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); | 103 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceEGL); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace gfx | 106 } // namespace gfx |
107 | 107 |
108 #endif // UI_GFX_GL_GL_SURFACE_EGL_H_ | 108 #endif // UI_GFX_GL_GL_SURFACE_EGL_H_ |
OLD | NEW |