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

Side by Side Diff: gpu/command_buffer/client/query_tracker.h

Issue 10837105: Adjust Query code to handle context lost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
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_CLIENT_QUERY_TRACKER_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_
7 7
8 #include <GLES2/gl2.h> 8 #include <GLES2/gl2.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 int32 token_; 143 int32 token_;
144 bool flushed_; 144 bool flushed_;
145 uint32 result_; 145 uint32 result_;
146 }; 146 };
147 147
148 QueryTracker(MappedMemoryManager* manager); 148 QueryTracker(MappedMemoryManager* manager);
149 ~QueryTracker(); 149 ~QueryTracker();
150 150
151 Query* CreateQuery(GLuint id, GLenum target); 151 Query* CreateQuery(GLuint id, GLenum target);
152 Query* GetQuery(GLuint id); 152 Query* GetQuery(GLuint id);
153 void RemoveQuery(GLuint id); 153 void RemoveQuery(GLuint id, bool context_lost);
154 154
155 private: 155 private:
156 typedef gpu::hash_map<GLuint, Query*> QueryMap; 156 typedef gpu::hash_map<GLuint, Query*> QueryMap;
157 157
158 QueryMap queries_; 158 QueryMap queries_;
159 QuerySyncManager query_sync_manager_; 159 QuerySyncManager query_sync_manager_;
160 160
161 DISALLOW_COPY_AND_ASSIGN(QueryTracker); 161 DISALLOW_COPY_AND_ASSIGN(QueryTracker);
162 }; 162 };
163 163
164 } // namespace gles2 164 } // namespace gles2
165 } // namespace gpu 165 } // namespace gpu
166 166
167 #endif // GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_ 167 #endif // GPU_COMMAND_BUFFER_CLIENT_QUERY_TRACKER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/client/query_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698