diff options
author | scshunt@google.com <scshunt@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-29 21:54:55 +0000 |
---|---|---|
committer | scshunt@google.com <scshunt@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-29 21:54:55 +0000 |
commit | 9ed07f8831639f9d6c74b9633262710af532df5b (patch) | |
tree | 3df992da5b2e95a9b09ab4661c5a9352e4fac2d9 /ppapi/shared_impl | |
parent | bdfa236676485f88c951929a7e5e2622541f9348 (diff) | |
download | chromium_src-9ed07f8831639f9d6c74b9633262710af532df5b.zip chromium_src-9ed07f8831639f9d6c74b9633262710af532df5b.tar.gz chromium_src-9ed07f8831639f9d6c74b9633262710af532df5b.tar.bz2 |
Add the necessary plumbing mechanisms to ensure proper WebGL support inside the <browser> tag, which is a separate patch.
Known bugs: Not all aspects of context sharing work properly; in no models would render although the background animated properly.
Requires a separate WebKit patch: https://bugs.webkit.org/show_bug.cgi?id=86504
R=fsamuel@chromium.org,piman@chromium.org,brettw@chromium.org
BUG=None
TEST=compiles
Review URL: https://chromiumcodereview.appspot.com/10386145
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139385 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r-- | ppapi/shared_impl/ppb_graphics_3d_shared.cc | 8 | ||||
-rw-r--r-- | ppapi/shared_impl/ppb_graphics_3d_shared.h | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.cc b/ppapi/shared_impl/ppb_graphics_3d_shared.cc index c539704..3a562f4 100644 --- a/ppapi/shared_impl/ppb_graphics_3d_shared.cc +++ b/ppapi/shared_impl/ppb_graphics_3d_shared.cc @@ -97,8 +97,10 @@ bool PPB_Graphics3D_Shared::HasPendingSwap() const { return TrackedCallback::IsPending(swap_callback_); } -bool PPB_Graphics3D_Shared::CreateGLES2Impl(int32 command_buffer_size, - int32 transfer_buffer_size) { +bool PPB_Graphics3D_Shared::CreateGLES2Impl( + int32 command_buffer_size, + int32 transfer_buffer_size, + gpu::gles2::GLES2Implementation* share_gles2) { gpu::CommandBuffer* command_buffer = GetCommandBuffer(); DCHECK(command_buffer); @@ -116,7 +118,7 @@ bool PPB_Graphics3D_Shared::CreateGLES2Impl(int32 command_buffer_size, // Create the object exposing the OpenGL API. gles2_impl_.reset(new gpu::gles2::GLES2Implementation( gles2_helper_.get(), - NULL, + share_gles2 ? share_gles2->share_group() : NULL, transfer_buffer_.get(), false, true)); diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.h b/ppapi/shared_impl/ppb_graphics_3d_shared.h index ee72144..3369f29 100644 --- a/ppapi/shared_impl/ppb_graphics_3d_shared.h +++ b/ppapi/shared_impl/ppb_graphics_3d_shared.h @@ -65,7 +65,8 @@ class PPAPI_SHARED_EXPORT PPB_Graphics3D_Shared bool HasPendingSwap() const; bool CreateGLES2Impl(int32 command_buffer_size, - int32 transfer_buffer_size); + int32 transfer_buffer_size, + gpu::gles2::GLES2Implementation* share_gles2); void DestroyGLES2Impl(); private: |