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_H_ | 5 #ifndef UI_GFX_GL_GL_SURFACE_H_ |
6 #define UI_GFX_GL_GL_SURFACE_H_ | 6 #define UI_GFX_GL_GL_SURFACE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // Get the platfrom specific configuration for this surface, if available. | 86 // Get the platfrom specific configuration for this surface, if available. |
87 virtual void* GetConfig(); | 87 virtual void* GetConfig(); |
88 | 88 |
89 // Get the GL pixel format of the surface, if available. | 89 // Get the GL pixel format of the surface, if available. |
90 virtual unsigned GetFormat(); | 90 virtual unsigned GetFormat(); |
91 | 91 |
92 // Create a GL surface that renders directly to a view. | 92 // Create a GL surface that renders directly to a view. |
93 static scoped_refptr<GLSurface> CreateViewGLSurface( | 93 static scoped_refptr<GLSurface> CreateViewGLSurface( |
94 bool software, | 94 bool software, |
95 gfx::PluginWindowHandle window); | 95 gfx::AcceleratedWidget window); |
96 | 96 |
97 // Create a GL surface used for offscreen rendering. | 97 // Create a GL surface used for offscreen rendering. |
98 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( | 98 static scoped_refptr<GLSurface> CreateOffscreenGLSurface( |
99 bool software, | 99 bool software, |
100 const gfx::Size& size); | 100 const gfx::Size& size); |
101 | 101 |
102 static GLSurface* GetCurrent(); | 102 static GLSurface* GetCurrent(); |
103 | 103 |
104 protected: | 104 protected: |
105 virtual ~GLSurface(); | 105 virtual ~GLSurface(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 GLSurface* surface() const { return surface_.get(); } | 139 GLSurface* surface() const { return surface_.get(); } |
140 | 140 |
141 private: | 141 private: |
142 scoped_refptr<GLSurface> surface_; | 142 scoped_refptr<GLSurface> surface_; |
143 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); | 143 DISALLOW_COPY_AND_ASSIGN(GLSurfaceAdapter); |
144 }; | 144 }; |
145 | 145 |
146 } // namespace gfx | 146 } // namespace gfx |
147 | 147 |
148 #endif // UI_GFX_GL_GL_SURFACE_H_ | 148 #endif // UI_GFX_GL_GL_SURFACE_H_ |
OLD | NEW |