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

Side by Side Diff: gpu/command_buffer/service/query_manager.cc

Issue 515943002: Manual fixups in gpu/ for scoped_refptr operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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
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/command_buffer/service/query_manager.h" 5 #include "gpu/command_buffer/service/query_manager.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 19 matching lines...) Expand all
30 : submit_count_(submit_count), cancelled_(false) {} 30 : submit_count_(submit_count), cancelled_(false) {}
31 31
32 void Cancel() { 32 void Cancel() {
33 base::AutoLock locked(lock_); 33 base::AutoLock locked(lock_);
34 cancelled_ = true; 34 cancelled_ = true;
35 } 35 }
36 36
37 virtual void DidComplete(const AsyncMemoryParams& mem_params) OVERRIDE { 37 virtual void DidComplete(const AsyncMemoryParams& mem_params) OVERRIDE {
38 base::AutoLock locked(lock_); 38 base::AutoLock locked(lock_);
39 if (!cancelled_) { 39 if (!cancelled_) {
40 DCHECK(mem_params.buffer()); 40 DCHECK(mem_params.buffer().get());
41 void* data = mem_params.GetDataAddress(); 41 void* data = mem_params.GetDataAddress();
42 QuerySync* sync = static_cast<QuerySync*>(data); 42 QuerySync* sync = static_cast<QuerySync*>(data);
43 base::subtle::Release_Store(&sync->process_count, submit_count_); 43 base::subtle::Release_Store(&sync->process_count, submit_count_);
44 } 44 }
45 } 45 }
46 46
47 private: 47 private:
48 virtual ~AsyncPixelTransferCompletionObserverImpl() {} 48 virtual ~AsyncPixelTransferCompletionObserverImpl() {}
49 49
50 base::subtle::Atomic32 submit_count_; 50 base::subtle::Atomic32 submit_count_;
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 bool QueryManager::EndQuery(Query* query, base::subtle::Atomic32 submit_count) { 738 bool QueryManager::EndQuery(Query* query, base::subtle::Atomic32 submit_count) {
739 DCHECK(query); 739 DCHECK(query);
740 if (!RemovePendingQuery(query)) { 740 if (!RemovePendingQuery(query)) {
741 return false; 741 return false;
742 } 742 }
743 return query->End(submit_count); 743 return query->End(submit_count);
744 } 744 }
745 745
746 } // namespace gles2 746 } // namespace gles2
747 } // namespace gpu 747 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698