| 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 "gpu/ipc/client/command_buffer_proxy_impl.h" | 5 #include "gpu/ipc/client/command_buffer_proxy_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 std::make_pair(fence_sync_release, flush_id)); | 233 std::make_pair(fence_sync_release, flush_id)); |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 | 237 |
| 238 if (put_offset_changed) | 238 if (put_offset_changed) |
| 239 latency_info_.clear(); | 239 latency_info_.clear(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void CommandBufferProxyImpl::OrderingBarrier(int32_t put_offset) { | 242 void CommandBufferProxyImpl::OrderingBarrier(int32_t put_offset) { |
| 243 CheckLock(); |
| 243 if (last_state_.error != gpu::error::kNoError) | 244 if (last_state_.error != gpu::error::kNoError) |
| 244 return; | 245 return; |
| 245 | 246 |
| 246 TRACE_EVENT1("gpu", "CommandBufferProxyImpl::OrderingBarrier", "put_offset", | 247 TRACE_EVENT1("gpu", "CommandBufferProxyImpl::OrderingBarrier", "put_offset", |
| 247 put_offset); | 248 put_offset); |
| 248 | 249 |
| 249 bool put_offset_changed = last_barrier_put_offset_ != put_offset; | 250 bool put_offset_changed = last_barrier_put_offset_ != put_offset; |
| 250 last_barrier_put_offset_ = put_offset; | 251 last_barrier_put_offset_ = put_offset; |
| 251 | 252 |
| 252 if (channel_) { | 253 if (channel_) { |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 } | 720 } |
| 720 | 721 |
| 721 void CommandBufferProxyImpl::InvalidGpuReplyOnClientThread() { | 722 void CommandBufferProxyImpl::InvalidGpuReplyOnClientThread() { |
| 722 std::unique_ptr<base::AutoLock> lock; | 723 std::unique_ptr<base::AutoLock> lock; |
| 723 if (lock_) | 724 if (lock_) |
| 724 lock.reset(new base::AutoLock(*lock_)); | 725 lock.reset(new base::AutoLock(*lock_)); |
| 725 OnDestroyed(gpu::error::kInvalidGpuMessage, gpu::error::kLostContext); | 726 OnDestroyed(gpu::error::kInvalidGpuMessage, gpu::error::kLostContext); |
| 726 } | 727 } |
| 727 | 728 |
| 728 } // namespace gpu | 729 } // namespace gpu |
| OLD | NEW |