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

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: Address comments; remove createOffscreenGraphicsContext3D 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..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(),

Powered by Google App Engine
This is Rietveld 408576698