diff options
author | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 23:55:45 +0000 |
---|---|---|
committer | zmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 23:55:45 +0000 |
commit | ba4cf17229cad57c66a3f76e08a87c1691c21f60 (patch) | |
tree | 7052be487aae9b31763b6b0f8594759ea1177239 /webkit/gpu | |
parent | 8535496f9a0073d72f2ed44f530f015a3848d929 (diff) | |
download | chromium_src-ba4cf17229cad57c66a3f76e08a87c1691c21f60.zip chromium_src-ba4cf17229cad57c66a3f76e08a87c1691c21f60.tar.gz chromium_src-ba4cf17229cad57c66a3f76e08a87c1691c21f60.tar.bz2 |
Revert 94775 - Implemented MapExternalResource for DumpRenderTree.
This will allow me to delete GL_copy_texture_to_parent_texture from the GPU process.
Review URL: http://codereview.chromium.org/7518005
TBR=apatrick@chromium.org
Review URL: http://codereview.chromium.org/7543001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r-- | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc | 64 |
1 files changed, 1 insertions, 63 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index 937fdb7..c046bc3 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -122,34 +122,6 @@ class GLInProcessContext : public base::SupportsWeakPtr<GLInProcessContext> { const int32* attrib_list, const GURL& active_url); - // Map a resource from an external context into this context. The source - // context need not be in the same share group from the client's point of - // view, allowing safe sharing between an "untrusted" context, like Pepper - // and a compositor context. - // - // Currently only texture resources are supported. TODO(apatrick): generalize - // this as appropriate. - // - // To unmap a previously mapped external resource, delete it in the - // destination context group. This will not delete the underlying texture - // object, just disassociate it with the id in the destination context group. - // - // The lifetime of the external resource is managed by the context group it - // was originally created in. When the last context in that group is destroyed - // the resource becomes invalid in all other context groups it is mapped into. - bool MapExternalResource(::gpu::resource_type::ResourceType resource_type, - uint32 resource_source_id, - GLInProcessContext* source_context, - uint32 resource_dest_id); - - // TODO(apatrick): this is a workaround until the parent / child relationship - // between contexts is removed. MapExternalResource has no such restrictions - // on the relationship between contexts. Use it instead. - bool MapExternalResourceToParent( - ::gpu::resource_type::ResourceType resource_type, - uint32 resource_source_id, - uint32 resource_dest_id); - // Resize an offscreen frame buffer. The resize occurs on the next call to // SwapBuffers. This is to avoid waiting until all pending GL calls have been // executed by the GPU process. Everything rendered up to the call to @@ -314,38 +286,6 @@ GLInProcessContext* GLInProcessContext::CreateOffscreenContext( #endif } -bool GLInProcessContext::MapExternalResource( - ::gpu::resource_type::ResourceType resource_type, - uint32 resource_source_id, - GLInProcessContext* source_context, - uint32 resource_dest_id) { - if (!command_buffer_.get()) - return false; - - return gpu_scheduler_->MapExternalResource( - resource_type, - resource_source_id, - source_context->gpu_scheduler_, - resource_dest_id); -} - -bool GLInProcessContext::MapExternalResourceToParent( - ::gpu::resource_type::ResourceType resource_type, - uint32 resource_source_id, - uint32 resource_dest_id) { - if (!command_buffer_.get()) - return false; - - if (!parent_.get()) - return false; - - return parent_->MapExternalResource( - resource_type, - resource_source_id, - this, - resource_dest_id); -} - void GLInProcessContext::ResizeOffscreen(const gfx::Size& size) { DCHECK(size.width() > 0 && size.height() > 0); if (size_ != size) { @@ -1657,10 +1597,8 @@ void WebGraphicsContext3DInProcessCommandBufferImpl::copyTextureToCompositor( WebGLId texture, WebGLId parentTexture) { // TODO(gmam): See if we can comment this in. // ClearContext(); + gl_->CopyTextureToParentTextureCHROMIUM(texture, parentTexture); gl_->Flush(); - context_->MapExternalResourceToParent(::gpu::resource_type::kTexture, - texture, - parentTexture); } void WebGraphicsContext3DInProcessCommandBufferImpl::OnSwapBuffersComplete() { |