Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: content/renderer/pepper/pepper_platform_context_3d_impl.cc

Issue 10386145: Add the necessary plumbing mechanisms to ensure proper WebGL support inside the <browser> tag, whic… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Shuffle EnterResource back out of the thunk layer Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(),

Powered by Google App Engine
This is Rietveld 408576698