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

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

Issue 10067035: RefCounted types should not have public destructors, media/ and gpu/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 | 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_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 "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 14 matching lines...) Expand all
25 25
26 // This class keeps track of the queries and their state 26 // This class keeps track of the queries and their state
27 // As Queries are not shared there is one QueryManager per context. 27 // As Queries are not shared there is one QueryManager per context.
28 class GPU_EXPORT QueryManager { 28 class GPU_EXPORT QueryManager {
29 public: 29 public:
30 class GPU_EXPORT Query : public base::RefCounted<Query> { 30 class GPU_EXPORT Query : public base::RefCounted<Query> {
31 public: 31 public:
32 typedef scoped_refptr<Query> Ref; 32 typedef scoped_refptr<Query> Ref;
33 33
34 Query( 34 Query(
35 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset); 35 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset);
36 virtual ~Query();
37 36
38 GLenum target() const { 37 GLenum target() const {
39 return target_; 38 return target_;
40 } 39 }
41 40
42 bool IsDeleted() const { 41 bool IsDeleted() const {
43 return deleted_; 42 return deleted_;
44 } 43 }
45 44
46 bool IsValid() const { 45 bool IsValid() const {
(...skipping 17 matching lines...) Expand all
64 63
65 // Returns false if shared memory for sync is invalid. 64 // Returns false if shared memory for sync is invalid.
66 virtual bool End(uint32 submit_count) = 0; 65 virtual bool End(uint32 submit_count) = 0;
67 66
68 // Returns false if shared memory for sync is invalid. 67 // Returns false if shared memory for sync is invalid.
69 virtual bool Process() = 0; 68 virtual bool Process() = 0;
70 69
71 virtual void Destroy(bool have_context) = 0; 70 virtual void Destroy(bool have_context) = 0;
72 71
73 protected: 72 protected:
73 virtual ~Query();
74
74 QueryManager* manager() const { 75 QueryManager* manager() const {
75 return manager_; 76 return manager_;
76 } 77 }
77 78
78 void MarkAsDeleted() { 79 void MarkAsDeleted() {
79 deleted_ = true; 80 deleted_ = true;
80 } 81 }
81 82
82 // Returns false if shared memory for sync is invalid. 83 // Returns false if shared memory for sync is invalid.
83 bool MarkAsCompleted(GLuint result); 84 bool MarkAsCompleted(GLuint result);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 typedef std::deque<Query::Ref> QueryQueue; 201 typedef std::deque<Query::Ref> QueryQueue;
201 QueryQueue pending_queries_; 202 QueryQueue pending_queries_;
202 203
203 DISALLOW_COPY_AND_ASSIGN(QueryManager); 204 DISALLOW_COPY_AND_ASSIGN(QueryManager);
204 }; 205 };
205 206
206 } // namespace gles2 207 } // namespace gles2
207 } // namespace gpu 208 } // namespace gpu
208 209
209 #endif // GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_ 210 #endif // GPU_COMMAND_BUFFER_SERVICE_QUERY_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/framebuffer_manager.cc ('k') | gpu/command_buffer/service/query_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698