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

Unified Diff: ui/gfx/gl/gl_context.h

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: ui/gfx/gl/gl_context.h
===================================================================
--- ui/gfx/gl/gl_context.h (revision 105158)
+++ ui/gfx/gl/gl_context.h (working copy)
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "ui/gfx/gl/gl_share_group.h"
+#include "ui/gfx/gl/gpu_preference.h"
namespace gfx {
@@ -25,7 +26,8 @@
// context can be made with other surface's of the same type. The compatible
// surface is only needed for certain platforms like WGL, OSMesa and GLX. It
// should be specific for all platforms though.
- virtual bool Initialize(GLSurface* compatible_surface) = 0;
+ virtual bool Initialize(
+ GLSurface* compatible_surface, GpuPreference gpu_preference) = 0;
// Destroys the GL context.
virtual void Destroy() = 0;
@@ -60,10 +62,13 @@
// internally created OpenGL context shares textures and other resources.
static scoped_refptr<GLContext> CreateGLContext(
GLShareGroup* share_group,
- GLSurface* compatible_surface);
+ GLSurface* compatible_surface,
+ GpuPreference gpu_preference);
static bool LosesAllContextsOnContextLost();
+ static bool SupportsDualGpus();
+
static GLContext* GetCurrent();
virtual bool WasAllocatedUsingARBRobustness();

Powered by Google App Engine
This is Rietveld 408576698