| Index: content/renderer/pepper/pepper_platform_context_3d_impl.cc
|
| diff --git a/content/renderer/pepper/pepper_platform_context_3d_impl.cc b/content/renderer/pepper/pepper_platform_context_3d_impl.cc
|
| index 8e2f96abf6f2de12b1424b931ab4db3ee9cd912e..670e9ab1acfd82a3e9429648ccc5047f40e240a4 100644
|
| --- a/content/renderer/pepper/pepper_platform_context_3d_impl.cc
|
| +++ b/content/renderer/pepper/pepper_platform_context_3d_impl.cc
|
| @@ -51,7 +51,8 @@ PlatformContext3DImpl::~PlatformContext3DImpl() {
|
| channel_ = NULL;
|
| }
|
|
|
| -bool PlatformContext3DImpl::Init(const int32* attrib_list) {
|
| +bool PlatformContext3DImpl::Init(const int32* attrib_list,
|
| + PlatformContext3D* share_context) {
|
| // Ignore initializing more than once.
|
| if (command_buffer_)
|
| return true;
|
| @@ -114,9 +115,16 @@ bool PlatformContext3DImpl::Init(const int32* attrib_list) {
|
| attribs.push_back(PP_GRAPHICS3DATTRIB_NONE);
|
| }
|
|
|
| + CommandBufferProxy* share_buffer = NULL;
|
| + if (share_context) {
|
| + PlatformContext3DImpl* share_impl =
|
| + static_cast<PlatformContext3DImpl*>(share_context);
|
| + share_buffer = share_impl->command_buffer_;
|
| + }
|
| +
|
| command_buffer_ = channel_->CreateOffscreenCommandBuffer(
|
| surface_size,
|
| - NULL,
|
| + share_buffer,
|
| "*",
|
| attribs,
|
| GURL::EmptyGURL(),
|
|
|