| Index: content/common/gpu/gpu_channel_manager.cc
|
| diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
|
| index 0359393f1ae0f1075585f4c21ffdf04b4248641a..99415185a7a33089533623b68a1451ce23134dc4 100644
|
| --- a/content/common/gpu/gpu_channel_manager.cc
|
| +++ b/content/common/gpu/gpu_channel_manager.cc
|
| @@ -107,7 +107,7 @@ void GpuChannelManager::RemoveRoute(int32 routing_id) {
|
| router_.RemoveRoute(routing_id);
|
| }
|
|
|
| -GpuChannel* GpuChannelManager::LookupChannel(int32 client_id) {
|
| +GpuChannel* GpuChannelManager::LookupChannel(int32 client_id) const {
|
| const auto& it = gpu_channels_.find(client_id);
|
| return it != gpu_channels_.end() ? it->second : nullptr;
|
| }
|
| @@ -251,16 +251,7 @@ void GpuChannelManager::OnLoadedShader(std::string program_proto) {
|
| program_cache()->LoadProgram(program_proto);
|
| }
|
|
|
| -uint32_t GpuChannelManager::ProcessedOrderNumber() {
|
| - uint32_t processed_order_num = 0;
|
| - for (auto& kv : gpu_channels_) {
|
| - processed_order_num =
|
| - std::max(processed_order_num, kv.second->GetProcessedOrderNum());
|
| - }
|
| - return processed_order_num;
|
| -}
|
| -
|
| -uint32_t GpuChannelManager::UnprocessedOrderNumber() {
|
| +uint32_t GpuChannelManager::GetUnprocessedOrderNum() const {
|
| uint32_t unprocessed_order_num = 0;
|
| for (auto& kv : gpu_channels_) {
|
| unprocessed_order_num =
|
| @@ -269,6 +260,15 @@ uint32_t GpuChannelManager::UnprocessedOrderNumber() {
|
| return unprocessed_order_num;
|
| }
|
|
|
| +uint32_t GpuChannelManager::GetProcessedOrderNum() const {
|
| + uint32_t processed_order_num = 0;
|
| + for (auto& kv : gpu_channels_) {
|
| + processed_order_num =
|
| + std::max(processed_order_num, kv.second->GetProcessedOrderNum());
|
| + }
|
| + return processed_order_num;
|
| +}
|
| +
|
| void GpuChannelManager::LoseAllContexts() {
|
| for (auto& kv : gpu_channels_) {
|
| kv.second->MarkAllContextsLost();
|
|
|