Chromium Code Reviews

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 #ifndef GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <vector> 9 #include <vector>
10 #include "base/atomicops.h" 10 #include "base/atomicops.h"
(...skipping 46 matching lines...)
57 return shm_offset_; 57 return shm_offset_;
58 } 58 }
59 59
60 // Returns false if shared memory for sync is invalid. 60 // Returns false if shared memory for sync is invalid.
61 virtual bool Begin() = 0; 61 virtual bool Begin() = 0;
62 62
63 // Returns false if shared memory for sync is invalid. 63 // Returns false if shared memory for sync is invalid.
64 virtual bool End(base::subtle::Atomic32 submit_count) = 0; 64 virtual bool End(base::subtle::Atomic32 submit_count) = 0;
65 65
66 // Returns false if shared memory for sync is invalid. 66 // Returns false if shared memory for sync is invalid.
67 virtual bool Process() = 0; 67 virtual bool Process(bool did_finish) = 0;
68 68
69 virtual void Destroy(bool have_context) = 0; 69 virtual void Destroy(bool have_context) = 0;
70 70
71 void AddCallback(base::Closure callback); 71 void AddCallback(base::Closure callback);
72 72
73 protected: 73 protected:
74 virtual ~Query(); 74 virtual ~Query();
75 75
76 QueryManager* manager() const { 76 QueryManager* manager() const {
77 return manager_; 77 return manager_;
(...skipping 85 matching lines...)
163 // Removes a query info for the given query. 163 // Removes a query info for the given query.
164 void RemoveQuery(GLuint client_id); 164 void RemoveQuery(GLuint client_id);
165 165
166 // Returns false if any query is pointing to invalid shared memory. 166 // Returns false if any query is pointing to invalid shared memory.
167 bool BeginQuery(Query* query); 167 bool BeginQuery(Query* query);
168 168
169 // Returns false if any query is pointing to invalid shared memory. 169 // Returns false if any query is pointing to invalid shared memory.
170 bool EndQuery(Query* query, base::subtle::Atomic32 submit_count); 170 bool EndQuery(Query* query, base::subtle::Atomic32 submit_count);
171 171
172 // Processes pending queries. Returns false if any queries are pointing 172 // Processes pending queries. Returns false if any queries are pointing
173 // to invalid shared memory. 173 // to invalid shared memory. |did_finish| is true if this is called as
174 bool ProcessPendingQueries(); 174 // a result of calling glFinish().
175 bool ProcessPendingQueries(bool did_finish);
175 176
176 // True if there are pending queries. 177 // True if there are pending queries.
177 bool HavePendingQueries(); 178 bool HavePendingQueries();
178 179
179 // Processes pending transfer queries. Returns false if any queries are 180 // Processes pending transfer queries. Returns false if any queries are
180 // pointing to invalid shared memory. 181 // pointing to invalid shared memory.
181 bool ProcessPendingTransferQueries(); 182 bool ProcessPendingTransferQueries();
182 183
183 // True if there are pending transfer queries. 184 // True if there are pending transfer queries.
184 bool HavePendingTransferQueries(); 185 bool HavePendingTransferQueries();
(...skipping 55 matching lines...)
240 // Async pixel transfer queries waiting for completion. 241 // Async pixel transfer queries waiting for completion.
241 QueryQueue pending_transfer_queries_; 242 QueryQueue pending_transfer_queries_;
242 243
243 DISALLOW_COPY_AND_ASSIGN(QueryManager); 244 DISALLOW_COPY_AND_ASSIGN(QueryManager);
244 }; 245 };
245 246
246 } // namespace gles2 247 } // namespace gles2
247 } // namespace gpu 248 } // namespace gpu
248 249
249 #endif // GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ 250 #endif // GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/command_buffer/service/query_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine