| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 APP_GFX_GL_GL_CONTEXT_H_ | 5 #ifndef APP_GFX_GL_GL_CONTEXT_H_ |
| 6 #define APP_GFX_GL_GL_CONTEXT_H_ | 6 #define APP_GFX_GL_GL_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "gfx/native_widget_types.h" | 10 #include "gfx/native_widget_types.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 virtual void* GetHandle() = 0; | 41 virtual void* GetHandle() = 0; |
| 42 | 42 |
| 43 #if !defined(OS_MACOSX) | 43 #if !defined(OS_MACOSX) |
| 44 // Create a GL context that renders directly to a view. | 44 // Create a GL context that renders directly to a view. |
| 45 static GLContext* CreateViewGLContext(gfx::PluginWindowHandle window, | 45 static GLContext* CreateViewGLContext(gfx::PluginWindowHandle window, |
| 46 bool multisampled); | 46 bool multisampled); |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 // Create a GL context used for offscreen rendering. It is initially backed by | 49 // Create a GL context used for offscreen rendering. It is initially backed by |
| 50 // a 1x1 pbuffer. Use it to create an FBO to do useful rendering. | 50 // a 1x1 pbuffer. Use it to create an FBO to do useful rendering. |
| 51 // |share_context|, if non-NULL, is a context which the internally created |
| 52 // OpenGL context shares textures and other resources. |
| 51 static GLContext* CreateOffscreenGLContext(GLContext* shared_context); | 53 static GLContext* CreateOffscreenGLContext(GLContext* shared_context); |
| 52 | 54 |
| 53 protected: | 55 protected: |
| 54 bool InitializeCommon(); | 56 bool InitializeCommon(); |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 DISALLOW_COPY_AND_ASSIGN(GLContext); | 59 DISALLOW_COPY_AND_ASSIGN(GLContext); |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 } // namespace gfx | 62 } // namespace gfx |
| 61 | 63 |
| 62 #endif // APP_GFX_GL_GL_CONTEXT_H_ | 64 #endif // APP_GFX_GL_GL_CONTEXT_H_ |
| OLD | NEW |