Index: ui/gfx/gl/gl_context_mac.cc |
=================================================================== |
--- ui/gfx/gl/gl_context_mac.cc (revision 104937) |
+++ ui/gfx/gl/gl_context_mac.cc (working copy) |
@@ -4,6 +4,7 @@ |
#include "base/basictypes.h" |
#include "base/logging.h" |
+#include "base/mac/mac_util.h" |
#include "base/memory/scoped_ptr.h" |
#include "third_party/mesa/MesaLib/include/GL/osmesa.h" |
#include "ui/gfx/gl/gl_bindings.h" |
@@ -20,18 +21,19 @@ |
scoped_refptr<GLContext> GLContext::CreateGLContext( |
GLShareGroup* share_group, |
- GLSurface* compatible_surface) { |
+ GLSurface* compatible_surface, |
+ GpuPreference gpu_preference) { |
switch (GetGLImplementation()) { |
case kGLImplementationDesktopGL: { |
scoped_refptr<GLContext> context(new GLContextCGL(share_group)); |
- if (!context->Initialize(compatible_surface)) |
+ if (!context->Initialize(compatible_surface, gpu_preference)) |
return NULL; |
return context; |
} |
case kGLImplementationOSMesaGL: { |
scoped_refptr<GLContext> context(new GLContextOSMesa(share_group)); |
- if (!context->Initialize(compatible_surface)) |
+ if (!context->Initialize(compatible_surface, gpu_preference)) |
return NULL; |
return context; |
@@ -44,4 +46,10 @@ |
} |
} |
+bool GLContext::SupportsDualGpus() { |
+ // TODO(kbr): the precision of this query could be improved, in |
+ // particular to detect single-GPU systems. |
Mark Mentovai
2011/10/12 00:48:18
This is the one thing I think we can do way better
Ken Russell (switch to Gerrit)
2011/10/12 01:16:36
I agree, this could be done better. Unfortunately
|
+ return base::mac::IsOSLionOrLater(); |
+} |
+ |
} // namespace gfx |