| 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
| 6 | 6 |
| 7 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" | 7 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" |
| 8 | 8 |
| 9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #ifndef GL_GLEXT_PROTOTYPES | 10 #ifndef GL_GLEXT_PROTOTYPES |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 #endif | 51 #endif |
| 52 if (context_) { | 52 if (context_) { |
| 53 ggl::DestroyContext(context_); | 53 ggl::DestroyContext(context_); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 static const char* kWebGraphicsContext3DPerferredGLExtensions = | 57 static const char* kWebGraphicsContext3DPerferredGLExtensions = |
| 58 "GL_OES_packed_depth_stencil " | 58 "GL_OES_packed_depth_stencil " |
| 59 "GL_OES_depth24 " | 59 "GL_OES_depth24 " |
| 60 "GL_CHROMIUM_copy_texture_to_parent_texture " |
| 61 "GL_CHROMIUM_map_sub " |
| 60 "GL_CHROMIUM_strict_attribs " | 62 "GL_CHROMIUM_strict_attribs " |
| 61 "GL_CHROMIUM_webglsl"; | 63 "GL_CHROMIUM_webglsl"; |
| 62 | 64 |
| 63 bool WebGraphicsContext3DCommandBufferImpl::initialize( | 65 bool WebGraphicsContext3DCommandBufferImpl::initialize( |
| 64 WebGraphicsContext3D::Attributes attributes, | 66 WebGraphicsContext3D::Attributes attributes, |
| 65 WebKit::WebView* web_view, | 67 WebKit::WebView* web_view, |
| 66 bool render_directly_to_web_view) { | 68 bool render_directly_to_web_view) { |
| 67 RenderThread* render_thread = RenderThread::current(); | 69 RenderThread* render_thread = RenderThread::current(); |
| 68 if (!render_thread) | 70 if (!render_thread) |
| 69 return false; | 71 return false; |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 } | 1023 } |
| 1022 | 1024 |
| 1023 void WebGraphicsContext3DCommandBufferImpl::copyTextureToCompositor( | 1025 void WebGraphicsContext3DCommandBufferImpl::copyTextureToCompositor( |
| 1024 unsigned texture, unsigned parentTexture) { | 1026 unsigned texture, unsigned parentTexture) { |
| 1025 makeContextCurrent(); | 1027 makeContextCurrent(); |
| 1026 glCopyTextureToParentTexture(texture, parentTexture); | 1028 glCopyTextureToParentTexture(texture, parentTexture); |
| 1027 glFlush(); | 1029 glFlush(); |
| 1028 } | 1030 } |
| 1029 | 1031 |
| 1030 #endif // defined(ENABLE_GPU) | 1032 #endif // defined(ENABLE_GPU) |
| OLD | NEW |