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

Unified Diff: content/common/gpu/gpu_channel.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 | « content/browser/renderer_host/accelerated_plugin_view_mac.mm ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel.h
===================================================================
--- content/common/gpu/gpu_channel.h (revision 105357)
+++ content/common/gpu/gpu_channel.h (working copy)
@@ -20,6 +20,7 @@
#include "content/common/message_router.h"
#include "ipc/ipc_sync_channel.h"
#include "ui/gfx/gl/gl_share_group.h"
+#include "ui/gfx/gl/gpu_preference.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
@@ -117,6 +118,10 @@
void AddRoute(int32 route_id, IPC::Channel::Listener* listener);
void RemoveRoute(int32 route_id);
+ // Indicates whether newly created contexts should prefer the
+ // discrete GPU even if they would otherwise use the integrated GPU.
+ bool ShouldPreferDiscreteGpu() const;
+
private:
void OnDestroy();
@@ -136,6 +141,14 @@
void OnEcho(const IPC::Message& message);
+ void OnWillGpuSwitchOccur(bool is_creating_context,
+ gfx::GpuPreference gpu_preference,
+ IPC::Message* reply_message);
+ void OnCloseChannel();
+
+ void WillCreateCommandBuffer(gfx::GpuPreference gpu_preference);
+ void DidDestroyCommandBuffer(gfx::GpuPreference gpu_preference);
+
// The lifetime of objects of this class is managed by a GpuChannelManager.
// The GpuChannelManager destroy all the GpuChannels that they own when they
// are destroyed. So a raw pointer is safe.
@@ -175,6 +188,7 @@
GpuWatchdog* watchdog_;
bool software_;
bool handle_messages_scheduled_;
+ int32 num_contexts_preferring_discrete_gpu_;
ScopedRunnableMethodFactory<GpuChannel> task_factory_;
« no previous file with comments | « content/browser/renderer_host/accelerated_plugin_view_mac.mm ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698