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

Unified Diff: content/renderer/gpu/renderer_gl_context.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: content/renderer/gpu/renderer_gl_context.cc
===================================================================
--- content/renderer/gpu/renderer_gl_context.cc (revision 105357)
+++ content/renderer/gpu/renderer_gl_context.cc (working copy)
@@ -85,7 +85,8 @@
RendererGLContext* share_group,
const char* allowed_extensions,
const int32* attrib_list,
- const GURL& active_url) {
+ const GURL& active_url,
+ gfx::GpuPreference gpu_preference) {
#if defined(ENABLE_GPU)
scoped_ptr<RendererGLContext> context(new RendererGLContext(channel));
if (!context->Initialize(
@@ -95,7 +96,8 @@
share_group,
allowed_extensions,
attrib_list,
- active_url))
+ active_url,
+ gpu_preference))
return NULL;
return context.release();
@@ -110,7 +112,8 @@
RendererGLContext* share_group,
const char* allowed_extensions,
const int32* attrib_list,
- const GURL& active_url) {
+ const GURL& active_url,
+ gfx::GpuPreference gpu_preference) {
#if defined(ENABLE_GPU)
scoped_ptr<RendererGLContext> context(new RendererGLContext(channel));
if (!context->Initialize(
@@ -120,7 +123,8 @@
share_group,
allowed_extensions,
attrib_list,
- active_url))
+ active_url,
+ gpu_preference))
return NULL;
return context.release();
@@ -290,7 +294,8 @@
RendererGLContext* share_group,
const char* allowed_extensions,
const int32* attrib_list,
- const GURL& active_url) {
+ const GURL& active_url,
+ gfx::GpuPreference gpu_preference) {
DCHECK(CalledOnValidThread());
DCHECK(size.width() >= 0 && size.height() >= 0);
TRACE_EVENT2("gpu", "RendererGLContext::Initialize",
@@ -347,14 +352,16 @@
share_group ? share_group->command_buffer_ : NULL,
allowed_extensions,
attribs,
- active_url);
+ active_url,
+ gpu_preference);
} else {
command_buffer_ = channel_->CreateOffscreenCommandBuffer(
size,
share_group ? share_group->command_buffer_ : NULL,
allowed_extensions,
attribs,
- active_url);
+ active_url,
+ gpu_preference);
}
if (!command_buffer_) {
Destroy();
« no previous file with comments | « content/renderer/gpu/renderer_gl_context.h ('k') | content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698