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

Side by Side Diff: content/renderer/gpu/webgraphicscontext3d_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 "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" 7 #include "content/renderer/gpu/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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( 333 void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM(
334 WebGLId texture, WebGLId parentTexture) { 334 WebGLId texture, WebGLId parentTexture) {
335 TRACE_EVENT0("gpu", "WebGfxCtx3DCmdBfrImpl::copyTextureToCompositor"); 335 TRACE_EVENT0("gpu", "WebGfxCtx3DCmdBfrImpl::copyTextureToCompositor");
336 336
337 gl_->Flush(); 337 gl_->Flush();
338 context_->MapExternalResourceToParent(gpu::resource_type::kTexture, 338 context_->MapExternalResourceToParent(gpu::resource_type::kTexture,
339 texture, 339 texture,
340 parentTexture); 340 parentTexture);
341 } 341 }
342 342
343 void WebGraphicsContext3DCommandBufferImpl::mapExternalTextureCHROMIUM(
344 WebGLId source_texture, WebGraphicsContext3D* source_context,
345 WebGLId destination_texture) {
346 WebGraphicsContext3DCommandBufferImpl* source_cmdbuffer_context =
347 static_cast<WebGraphicsContext3DCommandBufferImpl*>(source_context);
apatrick_chromium 2011/07/29 23:59:04 indentation
348 context_->MapExternalResource(gpu::resource_type::kTexture,
349 source_texture,
350 source_cmdbuffer_context->context(),
351 destination_texture);
352
353 }
354
355
343 void WebGraphicsContext3DCommandBufferImpl:: 356 void WebGraphicsContext3DCommandBufferImpl::
344 rateLimitOffscreenContextCHROMIUM() { 357 rateLimitOffscreenContextCHROMIUM() {
345 gl_->RateLimitOffscreenContextCHROMIUM(); 358 gl_->RateLimitOffscreenContextCHROMIUM();
346 } 359 }
347 360
348 WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: 361 WebKit::WebString WebGraphicsContext3DCommandBufferImpl::
349 getRequestableExtensionsCHROMIUM() { 362 getRequestableExtensionsCHROMIUM() {
350 return WebKit::WebString::fromUTF8( 363 return WebKit::WebString::fromUTF8(
351 gl_->GetRequestableExtensionsCHROMIUM()); 364 gl_->GetRequestableExtensionsCHROMIUM());
352 } 365 }
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 context_lost_callback_->onContextLost(); 1035 context_lost_callback_->onContextLost();
1023 } 1036 }
1024 1037
1025 RenderView* renderview = 1038 RenderView* renderview =
1026 web_view_ ? RenderView::FromWebView(web_view_) : NULL; 1039 web_view_ ? RenderView::FromWebView(web_view_) : NULL;
1027 if (renderview) 1040 if (renderview)
1028 renderview->OnViewContextSwapBuffersAborted(); 1041 renderview->OnViewContextSwapBuffersAborted();
1029 } 1042 }
1030 1043
1031 #endif // defined(ENABLE_GPU) 1044 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698