Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 7488069: Expose mapExternalTexture extension to WebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698