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

Unified Diff: webkit/gpu/webgraphicscontext3d_in_process_impl.cc

Issue 8233027: Support dynamic switching between integrated and discrete GPUs on Mac OS X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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: webkit/gpu/webgraphicscontext3d_in_process_impl.cc
===================================================================
--- webkit/gpu/webgraphicscontext3d_in_process_impl.cc (revision 105158)
+++ webkit/gpu/webgraphicscontext3d_in_process_impl.cc (working copy)
@@ -164,8 +164,13 @@
return false;
}
+ // TODO(kbr): This implementation doesn't yet support lost contexts
+ // and therefore can't yet properly support GPU switching.
+ gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
+
gl_context_ = gfx::GLContext::CreateGLContext(share_group,
- gl_surface_.get());
+ gl_surface_.get(),
+ gpu_preference);
if (!gl_context_.get()) {
if (!is_gles2_)
return false;
@@ -180,7 +185,8 @@
if (webView) webView->mainFrame()->collectGarbage();
gl_context_ = gfx::GLContext::CreateGLContext(share_group,
- gl_surface_.get());
+ gl_surface_.get(),
+ gpu_preference);
if (!gl_context_.get())
return false;
}

Powered by Google App Engine
This is Rietveld 408576698