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

Side by Side Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc

Issue 7529015: Allow the renderer process to map textures from one context into another. (Closed) Base URL: svn://chrome-svn/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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 326 }
327 327
328 void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM( 328 void WebGraphicsContext3DCommandBufferImpl::unmapTexSubImage2DCHROMIUM(
329 const void* mem) { 329 const void* mem) {
330 gl_->UnmapTexSubImage2DCHROMIUM(mem); 330 gl_->UnmapTexSubImage2DCHROMIUM(mem);
331 } 331 }
332 332
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 gl_->CopyTextureToParentTextureCHROMIUM(texture, parentTexture); 336
337 gl_->Flush(); 337 gl_->Flush();
338 context_->MapExternalResourceToParent(gpu::resource_type::kTexture,
339 texture,
340 parentTexture);
338 } 341 }
339 342
340 void WebGraphicsContext3DCommandBufferImpl:: 343 void WebGraphicsContext3DCommandBufferImpl::
341 rateLimitOffscreenContextCHROMIUM() { 344 rateLimitOffscreenContextCHROMIUM() {
342 gl_->RateLimitOffscreenContextCHROMIUM(); 345 gl_->RateLimitOffscreenContextCHROMIUM();
343 } 346 }
344 347
345 WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: 348 WebKit::WebString WebGraphicsContext3DCommandBufferImpl::
346 getRequestableExtensionsCHROMIUM() { 349 getRequestableExtensionsCHROMIUM() {
347 return WebKit::WebString::fromUTF8( 350 return WebKit::WebString::fromUTF8(
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 context_lost_callback_->onContextLost(); 1022 context_lost_callback_->onContextLost();
1020 } 1023 }
1021 1024
1022 RenderView* renderview = 1025 RenderView* renderview =
1023 web_view_ ? RenderView::FromWebView(web_view_) : NULL; 1026 web_view_ ? RenderView::FromWebView(web_view_) : NULL;
1024 if (renderview) 1027 if (renderview)
1025 renderview->OnViewContextSwapBuffersAborted(); 1028 renderview->OnViewContextSwapBuffersAborted();
1026 } 1029 }
1027 1030
1028 #endif // defined(ENABLE_GPU) 1031 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698