summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/renderer/browser_plugin/guest_to_embedder_channel.cc1
-rw-r--r--content/renderer/pepper/pepper_platform_context_3d_impl.cc12
-rw-r--r--content/renderer/pepper/pepper_platform_context_3d_impl.h3
3 files changed, 13 insertions, 3 deletions
diff --git a/content/renderer/browser_plugin/guest_to_embedder_channel.cc b/content/renderer/browser_plugin/guest_to_embedder_channel.cc
index ad82a68..1e5cec0 100644
--- a/content/renderer/browser_plugin/guest_to_embedder_channel.cc
+++ b/content/renderer/browser_plugin/guest_to_embedder_channel.cc
@@ -168,6 +168,7 @@ bool GuestToEmbedderChannel::CreateGraphicsContext(
bool success = Send(new PpapiHostMsg_PPBGraphics3D_Create(
ppapi::API_ID_PPB_GRAPHICS_3D,
render_view->guest_pp_instance(),
+ ppapi::HostResource(),
attribs,
&resource));
if (!success || resource.is_null())
diff --git a/content/renderer/pepper/pepper_platform_context_3d_impl.cc b/content/renderer/pepper/pepper_platform_context_3d_impl.cc
index 8e2f96a..670e9ab1 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(),
diff --git a/content/renderer/pepper/pepper_platform_context_3d_impl.h b/content/renderer/pepper/pepper_platform_context_3d_impl.h
index 8d3a0f6..bee7505 100644
--- a/content/renderer/pepper/pepper_platform_context_3d_impl.h
+++ b/content/renderer/pepper/pepper_platform_context_3d_impl.h
@@ -36,7 +36,8 @@ class PlatformContext3DImpl
PepperParentContextProvider* parent_context_provider);
virtual ~PlatformContext3DImpl();
- virtual bool Init(const int32* attrib_list) OVERRIDE;
+ virtual bool Init(const int32* attrib_list,
+ PlatformContext3D* share_context) OVERRIDE;
virtual unsigned GetBackingTextureId() OVERRIDE;
virtual bool IsOpaque() OVERRIDE;
virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE;