Chromium Code Reviews| Index: content/common/gpu/gpu_channel.h |
| =================================================================== |
| --- content/common/gpu/gpu_channel.h (revision 104937) |
| +++ 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,8 @@ |
| void AddRoute(int32 route_id, IPC::Channel::Listener* listener); |
| void RemoveRoute(int32 route_id); |
| + bool ShouldPreferDiscreteGpu() const; |
|
stuartmorgan
2011/10/12 07:13:24
Method-level comment?
Ken Russell (switch to Gerrit)
2011/10/12 22:39:42
Added.
|
| + |
| private: |
| void OnDestroy(); |
| @@ -136,6 +139,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 +186,7 @@ |
| GpuWatchdog* watchdog_; |
| bool software_; |
| bool handle_messages_scheduled_; |
| + int32 num_contexts_preferring_discrete_gpu_; |
| ScopedRunnableMethodFactory<GpuChannel> task_factory_; |