diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 19:22:37 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 19:22:37 +0000 |
commit | 92c2bc5ac0f605a14dfa88649e7c5a844eb0922b (patch) | |
tree | 814efb2ec279b176a052713fba9ae8d000265116 /ui/gfx/gl/gl_context.h | |
parent | b6793a8d2f4af8c0ca6cfca6fbe3168f5de75b5e (diff) | |
download | chromium_src-92c2bc5ac0f605a14dfa88649e7c5a844eb0922b.zip chromium_src-92c2bc5ac0f605a14dfa88649e7c5a844eb0922b.tar.gz chromium_src-92c2bc5ac0f605a14dfa88649e7c5a844eb0922b.tar.bz2 |
Split GLContext::Create*GLContext into GLSurface::Create*GLSurface plus a surface type independent GLContext::CreateGLContext.
TEST=webgl on windows and mac, trybots
BUG=none
Review URL: http://codereview.chromium.org/6997003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl/gl_context.h')
-rw-r--r-- | ui/gfx/gl/gl_context.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/ui/gfx/gl/gl_context.h b/ui/gfx/gl/gl_context.h index b27f8c9..548b6ae 100644 --- a/ui/gfx/gl/gl_context.h +++ b/ui/gfx/gl/gl_context.h @@ -66,19 +66,14 @@ class GLContext { // context must be current. bool HasExtension(const char* name); - static bool InitializeOneOff(); - -#if !defined(OS_MACOSX) - // Create a GL context that renders directly to a view. - static GLContext* CreateViewGLContext(gfx::PluginWindowHandle window, - bool multisampled); -#endif - - // Create a GL context used for offscreen rendering. It is initially backed by - // a 1x1 pbuffer. Use it to create an FBO to do useful rendering. - // |share_context|, if non-NULL, is a context which the internally created - // OpenGL context shares textures and other resources. - static GLContext* CreateOffscreenGLContext(GLContext* shared_context); + // Create a GL context that is compatible with the given surface. + // |share_context|, if non-NULL, is a context which the + // internally created OpenGL context shares textures and other resources. + // TODO(apatrick): For the time being, the context will take ownership of the + // surface and the surface will be made the current read and draw surface + // when the context is made current. + static GLContext* CreateGLContext(GLSurface* compatible_surface, + GLContext* shared_context); static bool LosesAllContextsOnContextLost(); |