| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 7 #include "webkit/gpu/webgraphicscontext3d_in_process_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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 gl_->UnmapTexSubImage2DCHROMIUM(mem); | 960 gl_->UnmapTexSubImage2DCHROMIUM(mem); |
| 961 } | 961 } |
| 962 | 962 |
| 963 void WebGraphicsContext3DInProcessCommandBufferImpl:: | 963 void WebGraphicsContext3DInProcessCommandBufferImpl:: |
| 964 copyTextureToParentTextureCHROMIUM(WebGLId texture, WebGLId parentTexture) { | 964 copyTextureToParentTextureCHROMIUM(WebGLId texture, WebGLId parentTexture) { |
| 965 // TODO(gmam): See if we can comment this in. | 965 // TODO(gmam): See if we can comment this in. |
| 966 // ClearContext(); | 966 // ClearContext(); |
| 967 copyTextureToCompositor(texture, parentTexture); | 967 copyTextureToCompositor(texture, parentTexture); |
| 968 } | 968 } |
| 969 | 969 |
| 970 void WebGraphicsContext3DInProcessCommandBufferImpl::mapExternalTextureCHROMIUM( |
| 971 WebGLId source_texture, WebGraphicsContext3D* source_context, |
| 972 WebGLId destination_texture) { |
| 973 WebGraphicsContext3DInProcessCommandBufferImpl* source_cmdbuffer_context = |
| 974 static_cast<WebGraphicsContext3DInProcessCommandBufferImpl*>( |
| 975 source_context); |
| 976 context_->MapExternalResource(::gpu::resource_type::kTexture, |
| 977 source_texture, |
| 978 source_cmdbuffer_context->context(), |
| 979 destination_texture); |
| 980 } |
| 981 |
| 970 void WebGraphicsContext3DInProcessCommandBufferImpl:: | 982 void WebGraphicsContext3DInProcessCommandBufferImpl:: |
| 971 rateLimitOffscreenContextCHROMIUM() { | 983 rateLimitOffscreenContextCHROMIUM() { |
| 972 // TODO(gmam): See if we can comment this in. | 984 // TODO(gmam): See if we can comment this in. |
| 973 // ClearContext(); | 985 // ClearContext(); |
| 974 gl_->RateLimitOffscreenContextCHROMIUM(); | 986 gl_->RateLimitOffscreenContextCHROMIUM(); |
| 975 } | 987 } |
| 976 | 988 |
| 977 WebKit::WebString WebGraphicsContext3DInProcessCommandBufferImpl:: | 989 WebKit::WebString WebGraphicsContext3DInProcessCommandBufferImpl:: |
| 978 getRequestableExtensionsCHROMIUM() { | 990 getRequestableExtensionsCHROMIUM() { |
| 979 // TODO(gmam): See if we can comment this in. | 991 // TODO(gmam): See if we can comment this in. |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 if (context_lost_callback_) { | 1695 if (context_lost_callback_) { |
| 1684 context_lost_callback_->onContextLost(); | 1696 context_lost_callback_->onContextLost(); |
| 1685 } | 1697 } |
| 1686 } | 1698 } |
| 1687 | 1699 |
| 1688 } // namespace gpu | 1700 } // namespace gpu |
| 1689 } // namespace webkit | 1701 } // namespace webkit |
| 1690 | 1702 |
| 1691 #endif // defined(ENABLE_GPU) | 1703 #endif // defined(ENABLE_GPU) |
| 1692 | 1704 |
| OLD | NEW |