Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1017)

Side by Side Diff: gpu/ipc/client/command_buffer_proxy_impl.cc

Issue 1924353002: Added a lock check for CommandBufferProxyImpl::OrderingBarrier(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698