| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 // Called to remove a listener for a particular message routing ID. | 126 // Called to remove a listener for a particular message routing ID. |
| 127 void RemoveRoute(int32 route_id); | 127 void RemoveRoute(int32 route_id); |
| 128 | 128 |
| 129 gpu::PreemptionFlag* GetPreemptionFlag(); | 129 gpu::PreemptionFlag* GetPreemptionFlag(); |
| 130 | 130 |
| 131 bool handle_messages_scheduled() const { return handle_messages_scheduled_; } | 131 bool handle_messages_scheduled() const { return handle_messages_scheduled_; } |
| 132 uint64 messages_processed() const { return messages_processed_; } | 132 uint64 messages_processed() const { return messages_processed_; } |
| 133 | 133 |
| 134 // If |preemption_flag->IsSet()|, any stub on this channel | 134 // If |preemption_flag->IsSet()|, any stub on this channel |
| 135 // should stop issuing GL commands. Setting this to NULL stops deferral. | 135 // should stop issuing GL commands. Setting this to nullptr stops deferral. |
| 136 void SetPreemptByFlag( | 136 void SetPreemptByFlag( |
| 137 scoped_refptr<gpu::PreemptionFlag> preemption_flag); | 137 scoped_refptr<gpu::PreemptionFlag> preemption_flag); |
| 138 | 138 |
| 139 void CacheShader(const std::string& key, const std::string& shader); | 139 void CacheShader(const std::string& key, const std::string& shader); |
| 140 | 140 |
| 141 void AddFilter(IPC::MessageFilter* filter); | 141 void AddFilter(IPC::MessageFilter* filter); |
| 142 void RemoveFilter(IPC::MessageFilter* filter); | 142 void RemoveFilter(IPC::MessageFilter* filter); |
| 143 | 143 |
| 144 uint64 GetMemoryUsage(); | 144 uint64 GetMemoryUsage(); |
| 145 | 145 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 173 GpuChannelManager* gpu_channel_manager_; | 173 GpuChannelManager* gpu_channel_manager_; |
| 174 | 174 |
| 175 scoped_ptr<IPC::SyncChannel> channel_; | 175 scoped_ptr<IPC::SyncChannel> channel_; |
| 176 | 176 |
| 177 uint64 messages_processed_; | 177 uint64 messages_processed_; |
| 178 | 178 |
| 179 // Whether the processing of IPCs on this channel is stalled and we should | 179 // Whether the processing of IPCs on this channel is stalled and we should |
| 180 // preempt other GpuChannels. | 180 // preempt other GpuChannels. |
| 181 scoped_refptr<gpu::PreemptionFlag> preempting_flag_; | 181 scoped_refptr<gpu::PreemptionFlag> preempting_flag_; |
| 182 | 182 |
| 183 // If non-NULL, all stubs on this channel should stop processing GL | 183 // If non-nullptr, all stubs on this channel should stop processing GL |
| 184 // commands (via their GpuScheduler) when preempted_flag_->IsSet() | 184 // commands (via their GpuScheduler) when preempted_flag_->IsSet() |
| 185 scoped_refptr<gpu::PreemptionFlag> preempted_flag_; | 185 scoped_refptr<gpu::PreemptionFlag> preempted_flag_; |
| 186 | 186 |
| 187 std::deque<IPC::Message*> deferred_messages_; | 187 std::deque<IPC::Message*> deferred_messages_; |
| 188 | 188 |
| 189 // The id of the client who is on the other side of the channel. | 189 // The id of the client who is on the other side of the channel. |
| 190 int client_id_; | 190 int client_id_; |
| 191 | 191 |
| 192 // Uniquely identifies the channel within this GPU process. | 192 // Uniquely identifies the channel within this GPU process. |
| 193 std::string channel_id_; | 193 std::string channel_id_; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 223 // that any WeakPtrs to Controller are invalidated before its members | 223 // that any WeakPtrs to Controller are invalidated before its members |
| 224 // variable's destructors are executed, rendering them invalid. | 224 // variable's destructors are executed, rendering them invalid. |
| 225 base::WeakPtrFactory<GpuChannel> weak_factory_; | 225 base::WeakPtrFactory<GpuChannel> weak_factory_; |
| 226 | 226 |
| 227 DISALLOW_COPY_AND_ASSIGN(GpuChannel); | 227 DISALLOW_COPY_AND_ASSIGN(GpuChannel); |
| 228 }; | 228 }; |
| 229 | 229 |
| 230 } // namespace content | 230 } // namespace content |
| 231 | 231 |
| 232 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 232 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
| OLD | NEW |