diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-04 21:33:49 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-04 21:33:49 +0000 |
commit | 92fa5b98619fb7edaa39b31a4f0473e72ae5d11e (patch) | |
tree | 6062982749e218d881a9fe5dbb19d869aad5d640 /content | |
parent | ee731a5aab73c78a3787c939b8f1ad731d9539ba (diff) | |
download | chromium_src-92fa5b98619fb7edaa39b31a4f0473e72ae5d11e.zip chromium_src-92fa5b98619fb7edaa39b31a4f0473e72ae5d11e.tar.gz chromium_src-92fa5b98619fb7edaa39b31a4f0473e72ae5d11e.tar.bz2 |
Make contexts actually use ShareGroup for shared contexts.
The service ALWAYS has bind_generates_resource set to true.
In fact we can just remove that flag on the service in another CL.
It doesn't need to be enforced on the service. It was only there
to help the client find bugs. Now the client and find them itself
in a Debug build.
I can remove share_resources everywhere. That flag is no longer
needed. Because removing that flag touches so many files I'd
prefer to do that in another CL.
Note: I probably can't check this in until the bugs it
uncovers are fixed. Maybe they can be marked as failing.
For example the webgl context-lost tests hit an assert.
TEST=ran the webgl conformance tests.
BUG=120297
Review URL: https://chromiumcodereview.appspot.com/9958038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc | 7 | ||||
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.cc | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index a8b4a3a..bf32cf9 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -343,10 +343,15 @@ bool WebGraphicsContext3DCommandBufferImpl::CreateContext( // process and the GPU process. transfer_buffer_ = new gpu::TransferBuffer(gles2_helper_); + WebGraphicsContext3DCommandBufferImpl* share_group_context = + g_all_shared_contexts.Pointer()->empty() ? + NULL : *g_all_shared_contexts.Pointer()->begin(); + // Create the object exposing the OpenGL API. gl_ = new gpu::gles2::GLES2Implementation( gles2_helper_, - NULL, + share_group_context ? + share_group_context->GetImplementation()->share_group() : NULL, transfer_buffer_, attributes_.shareResources, bind_generates_resources_); diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 5c52616..047fb95 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -58,15 +58,10 @@ GpuCommandBufferStub::GpuCommandBufferStub( parent_stub_for_initialization_(), parent_texture_for_initialization_(0), watchdog_(watchdog) { - - gpu::gles2::ContextCreationAttribParser creation_attribs; - creation_attribs.Parse(attribs); - if (share_group) { context_group_ = share_group->context_group_; } else { - context_group_ = new gpu::gles2::ContextGroup( - creation_attribs.bind_generates_resource_); + context_group_ = new gpu::gles2::ContextGroup(true); } if (surface_id != 0) surface_state_.reset(new GpuCommandBufferStubBase::SurfaceState( |