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

Unified Diff: ui/gfx/surface/accelerated_surface_mac.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
« no previous file with comments | « ui/gfx/gl/gpu_preference.h ('k') | ui/gfx/surface/accelerated_surface_mac.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.h
===================================================================
--- ui/gfx/surface/accelerated_surface_mac.h (revision 105357)
+++ ui/gfx/surface/accelerated_surface_mac.h (working copy)
@@ -11,10 +11,11 @@
#include "base/callback_old.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/gl/gl_context.h"
+#include "ui/gfx/gl/gl_surface.h"
+#include "ui/gfx/gl/gpu_preference.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
-#include "ui/gfx/gl/gl_context.h"
-#include "ui/gfx/gl/gl_surface.h"
#include "ui/gfx/surface/surface_export.h"
#include "ui/gfx/surface/transport_dib.h"
@@ -46,9 +47,14 @@
// an FBO internally does NOT work properly with client code which uses
// OpenGL (i.e., via GLES2 command buffers), because the GLES2
// implementation does not know to bind the accelerated surface's
- // internal FBO when the default FBO is bound. Returns false upon
+ // internal FBO when the default FBO is bound. |gpu_preference| indicates
+ // the GPU preference for the internally allocated GLContext. If
+ // |share_context| is non-NULL, then on platforms supporting dual GPUs,
+ // its GPU preference must match the passed one. Returns false upon
// failure.
- bool Initialize(gfx::GLContext* share_context, bool allocate_fbo);
+ bool Initialize(gfx::GLContext* share_context,
+ bool allocate_fbo,
+ gfx::GpuPreference gpu_preference);
// Tear down. Must be called before destructor to prevent leaks.
void Destroy();
« no previous file with comments | « ui/gfx/gl/gpu_preference.h ('k') | ui/gfx/surface/accelerated_surface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698