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 #include "ppapi/proxy/ppapi_command_buffer_proxy.h" | 5 #include "ppapi/proxy/ppapi_command_buffer_proxy.h" |
6 | 6 |
7 #include "ppapi/proxy/ppapi_messages.h" | 7 #include "ppapi/proxy/ppapi_messages.h" |
8 #include "ppapi/proxy/proxy_channel.h" | 8 #include "ppapi/proxy/proxy_channel.h" |
9 #include "ppapi/shared_impl/api_id.h" | 9 #include "ppapi/shared_impl/api_id.h" |
10 #include "ppapi/shared_impl/host_resource.h" | 10 #include "ppapi/shared_impl/host_resource.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
255 return true; | 255 return true; |
256 | 256 |
257 last_state_.error = gpu::error::kLostContext; | 257 last_state_.error = gpu::error::kLostContext; |
258 return false; | 258 return false; |
259 } | 259 } |
260 | 260 |
261 void PpapiCommandBufferProxy::UpdateState( | 261 void PpapiCommandBufferProxy::UpdateState( |
262 const gpu::CommandBuffer::State& state) { | 262 const gpu::CommandBuffer::State& state) { |
263 // Handle wraparound. It works as long as we don't have more than 2B state | 263 // Handle wraparound. It works as long as we don't have more than 2B state |
264 // updates in flight across which reordering occurs. | 264 // updates in flight across which reordering occurs. |
265 if (state.generation - last_state_.generation < 0x80000000U) | 265 if (state.error != gpu::error::kNoError || |
piman
2012/05/18 02:42:46
See comments in the other files, I'd rather the Pp
Fady Samuel
2012/05/18 19:27:48
Done.
| |
266 state.generation - last_state_.generation < 0x80000000U) | |
266 last_state_ = state; | 267 last_state_ = state; |
267 } | 268 } |
268 | 269 |
269 } // namespace proxy | 270 } // namespace proxy |
270 } // namespace ppapi | 271 } // namespace ppapi |
271 | 272 |
OLD | NEW |