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..c8a067abf987cda241cedb3fb813963d271f0fed 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 = 0; |
piman
2012/05/16 23:38:45
nit: share_buffer = NULL
(scshunt)
2012/05/17 16:55:45
picked.
|
+ if (share_context) { |
+ PlatformContext3DImpl* share_impl = |
+ static_cast<PlatformContext3DImpl*>(share_context); |
piman
2012/05/16 23:38:45
nit: indent for continuation should be +4
(scshunt)
2012/05/17 16:55:45
picked.
|
+ share_buffer = share_impl->command_buffer_; |
+ } |
+ |
command_buffer_ = channel_->CreateOffscreenCommandBuffer( |
surface_size, |
- NULL, |
+ share_buffer, |
"*", |
attribs, |
GURL::EmptyGURL(), |