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

Unified Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc

Issue 7205012: RendererGLContext supports reparenting a GL context. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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/gpu/webgraphicscontext3d_command_buffer_impl.cc
===================================================================
--- content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc (revision 89700)
+++ content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc (working copy)
@@ -104,6 +104,7 @@
if (web_view && web_view->mainFrame())
active_url = GURL(web_view->mainFrame()->url());
+ RendererGLContext* parent_context = NULL;
if (render_directly_to_web_view) {
RenderView* renderview = RenderView::FromWebView(web_view);
if (!renderview)
@@ -125,7 +126,6 @@
} else {
bool compositing_enabled = !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableAcceleratedCompositing);
- RendererGLContext* parent_context = NULL;
// If GPU compositing is enabled we need to create a GL context that shares
// resources with the compositor's context.
if (compositing_enabled) {
@@ -142,7 +142,6 @@
}
context_ = RendererGLContext::CreateOffscreenContext(
host,
- parent_context,
gfx::Size(1, 1),
preferred_extensions,
attribs,
@@ -152,6 +151,9 @@
if (!context_)
return false;
+ if (!context_->SetParent(parent_context))
+ return false;
+
gl_ = context_->GetImplementation();
context_->SetContextLostCallback(
NewCallback(this,

Powered by Google App Engine
This is Rietveld 408576698