| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/renderer/gpu_channel_host.h" | 5 #include "chrome/renderer/gpu_channel_host.h" |
| 6 | 6 |
| 7 #include "chrome/common/child_process.h" | 7 #include "chrome/common/child_process.h" |
| 8 #include "chrome/common/gpu_messages.h" | 8 #include "chrome/common/gpu_messages.h" |
| 9 #include "chrome/renderer/command_buffer_proxy.h" | 9 #include "chrome/renderer/command_buffer_proxy.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 state_ = LOST; | 37 state_ = LOST; |
| 38 | 38 |
| 39 // Channel is invalid and will be reinitialized if this host is requested | 39 // Channel is invalid and will be reinitialized if this host is requested |
| 40 // again. | 40 // again. |
| 41 channel_.reset(); | 41 channel_.reset(); |
| 42 | 42 |
| 43 // Inform all the proxies that an error has occured. This will be reported via | 43 // Inform all the proxies that an error has occured. This will be reported via |
| 44 // OpenGL as a lost context. | 44 // OpenGL as a lost context. |
| 45 for (ProxyMap::iterator iter = proxies_.begin(); | 45 for (ProxyMap::iterator iter = proxies_.begin(); |
| 46 iter != proxies_.end(); iter++) { | 46 iter != proxies_.end(); iter++) { |
| 47 proxies_.erase(iter->first); | |
| 48 router_.RemoveRoute(iter->first); | 47 router_.RemoveRoute(iter->first); |
| 49 iter->second->OnChannelError(); | 48 iter->second->OnChannelError(); |
| 50 } | 49 } |
| 51 | 50 |
| 52 // The proxies are reference counted so this will not result in their | 51 // The proxies are reference counted so this will not result in their |
| 53 // destruction if the client still holds a reference. The proxy will report | 52 // destruction if the client still holds a reference. The proxy will report |
| 54 // a lost context, indicating to the client that it needs to be recreated. | 53 // a lost context, indicating to the client that it needs to be recreated. |
| 55 proxies_.clear(); | 54 proxies_.clear(); |
| 56 } | 55 } |
| 57 | 56 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 int route_id = command_buffer->route_id(); | 121 int route_id = command_buffer->route_id(); |
| 123 if (proxies_.find(command_buffer->route_id()) != proxies_.end()) { | 122 if (proxies_.find(command_buffer->route_id()) != proxies_.end()) { |
| 124 proxies_.erase(route_id); | 123 proxies_.erase(route_id); |
| 125 router_.RemoveRoute(route_id); | 124 router_.RemoveRoute(route_id); |
| 126 } | 125 } |
| 127 | 126 |
| 128 delete command_buffer; | 127 delete command_buffer; |
| 129 #endif | 128 #endif |
| 130 } | 129 } |
| 131 | 130 |
| OLD | NEW |