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

Unified Diff: ui/gfx/surface/accelerated_surface_mac.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
« no previous file with comments | « ui/gfx/surface/accelerated_surface_mac.h ('k') | views/widget/native_widget_wayland.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/surface/accelerated_surface_mac.cc
===================================================================
--- ui/gfx/surface/accelerated_surface_mac.cc (revision 105357)
+++ ui/gfx/surface/accelerated_surface_mac.cc (working copy)
@@ -24,8 +24,10 @@
AcceleratedSurface::~AcceleratedSurface() {}
-bool AcceleratedSurface::Initialize(gfx::GLContext* share_context,
- bool allocate_fbo) {
+bool AcceleratedSurface::Initialize(
+ gfx::GLContext* share_context,
+ bool allocate_fbo,
+ gfx::GpuPreference gpu_preference) {
allocate_fbo_ = allocate_fbo;
// Ensure GL is initialized before trying to create an offscreen GL context.
@@ -47,8 +49,10 @@
gfx::GLShareGroup* share_group =
share_context ? share_context->share_group() : NULL;
- gl_context_ = gfx::GLContext::CreateGLContext(share_group,
- gl_surface_.get());
+ gl_context_ = gfx::GLContext::CreateGLContext(
+ share_group,
+ gl_surface_.get(),
+ gpu_preference);
if (!gl_context_.get()) {
Destroy();
return false;
« no previous file with comments | « ui/gfx/surface/accelerated_surface_mac.h ('k') | views/widget/native_widget_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698