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

Unified Diff: content/renderer/gpu/gpu_channel_host.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 | « content/renderer/gpu/gpu_channel_host.h ('k') | content/renderer/gpu/renderer_gl_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/gpu_channel_host.cc
===================================================================
--- content/renderer/gpu/gpu_channel_host.cc (revision 105357)
+++ content/renderer/gpu/gpu_channel_host.cc (working copy)
@@ -205,7 +205,8 @@
CommandBufferProxy* share_group,
const std::string& allowed_extensions,
const std::vector<int32>& attribs,
- const GURL& active_url) {
+ const GURL& active_url,
+ gfx::GpuPreference gpu_preference) {
DCHECK(ChildThread::current());
#if defined(ENABLE_GPU)
AutoLock lock(context_lock_);
@@ -219,6 +220,7 @@
init_params.allowed_extensions = allowed_extensions;
init_params.attribs = attribs;
init_params.active_url = active_url;
+ init_params.gpu_preference = gpu_preference;
int32 route_id;
if (!ChildThread::current()->Send(
new GpuHostMsg_CreateViewCommandBuffer(
@@ -256,7 +258,8 @@
CommandBufferProxy* share_group,
const std::string& allowed_extensions,
const std::vector<int32>& attribs,
- const GURL& active_url) {
+ const GURL& active_url,
+ gfx::GpuPreference gpu_preference) {
#if defined(ENABLE_GPU)
AutoLock lock(context_lock_);
// An error occurred. Need to get the host again to reinitialize it.
@@ -269,6 +272,7 @@
init_params.allowed_extensions = allowed_extensions;
init_params.attribs = attribs;
init_params.active_url = active_url;
+ init_params.gpu_preference = gpu_preference;
int32 route_id;
if (!Send(new GpuChannelMsg_CreateOffscreenCommandBuffer(size,
init_params,
@@ -322,3 +326,19 @@
&GpuChannelHost::MessageFilter::RemoveRoute,
route_id));
}
+
+bool GpuChannelHost::WillGpuSwitchOccur(
+ bool is_creating_context, gfx::GpuPreference gpu_preference) {
+ bool result = false;
+ if (!Send(new GpuChannelMsg_WillGpuSwitchOccur(is_creating_context,
+ gpu_preference,
+ &result))) {
+ return false;
+ }
+ return result;
+}
+
+void GpuChannelHost::ForciblyCloseChannel() {
+ Send(new GpuChannelMsg_CloseChannel());
+ SetStateLost();
+}
« no previous file with comments | « content/renderer/gpu/gpu_channel_host.h ('k') | content/renderer/gpu/renderer_gl_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698