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

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

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: Created 8 years, 8 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 #include "gpu/command_buffer/service/query_manager.h" 5 #include "gpu/command_buffer/service/query_manager.h"
6 #include "base/atomicops.h" 6 #include "base/atomicops.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" 9 #include "gpu/command_buffer/common/gles2_cmd_format.h"
10 #include "gpu/command_buffer/service/common_decoder.h" 10 #include "gpu/command_buffer/service/common_decoder.h"
11 11
12 namespace gpu { 12 namespace gpu {
13 namespace gles2 { 13 namespace gles2 {
14 14
15 class AllSamplesPassedQuery : public QueryManager::Query { 15 class AllSamplesPassedQuery : public QueryManager::Query {
16 public: 16 public:
17 AllSamplesPassedQuery( 17 AllSamplesPassedQuery(
18 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset, 18 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset,
19 GLuint service_id); 19 GLuint service_id);
20 virtual ~AllSamplesPassedQuery();
21 virtual bool Begin() OVERRIDE; 20 virtual bool Begin() OVERRIDE;
22 virtual bool End(uint32 submit_count) OVERRIDE; 21 virtual bool End(uint32 submit_count) OVERRIDE;
23 virtual bool Process() OVERRIDE; 22 virtual bool Process() OVERRIDE;
24 virtual void Destroy(bool have_context) OVERRIDE; 23 virtual void Destroy(bool have_context) OVERRIDE;
25 24
26 private: 25 private:
26 virtual ~AllSamplesPassedQuery();
27
27 // Service side query id. 28 // Service side query id.
28 GLuint service_id_; 29 GLuint service_id_;
29 }; 30 };
30 31
31 AllSamplesPassedQuery::AllSamplesPassedQuery( 32 AllSamplesPassedQuery::AllSamplesPassedQuery(
32 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset, 33 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset,
33 GLuint service_id) 34 GLuint service_id)
34 : Query(manager, target, shm_id, shm_offset), 35 : Query(manager, target, shm_id, shm_offset),
35 service_id_(service_id) { 36 service_id_(service_id) {
36 } 37 }
(...skipping 29 matching lines...) Expand all
66 glGetQueryObjectuivARB( 67 glGetQueryObjectuivARB(
67 service_id_, GL_QUERY_RESULT_EXT, &result); 68 service_id_, GL_QUERY_RESULT_EXT, &result);
68 69
69 return MarkAsCompleted(result); 70 return MarkAsCompleted(result);
70 } 71 }
71 72
72 class CommandsIssuedQuery : public QueryManager::Query { 73 class CommandsIssuedQuery : public QueryManager::Query {
73 public: 74 public:
74 CommandsIssuedQuery( 75 CommandsIssuedQuery(
75 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset); 76 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset);
76 virtual ~CommandsIssuedQuery();
77 77
78 virtual bool Begin() OVERRIDE; 78 virtual bool Begin() OVERRIDE;
79 virtual bool End(uint32 submit_count) OVERRIDE; 79 virtual bool End(uint32 submit_count) OVERRIDE;
80 virtual bool Process() OVERRIDE; 80 virtual bool Process() OVERRIDE;
81 virtual void Destroy(bool have_context) OVERRIDE; 81 virtual void Destroy(bool have_context) OVERRIDE;
82 82
83 private: 83 private:
84 virtual ~CommandsIssuedQuery();
85
84 base::TimeTicks begin_time_; 86 base::TimeTicks begin_time_;
85 }; 87 };
86 88
87 CommandsIssuedQuery::CommandsIssuedQuery( 89 CommandsIssuedQuery::CommandsIssuedQuery(
88 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset) 90 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset)
89 : Query(manager, target, shm_id, shm_offset) { 91 : Query(manager, target, shm_id, shm_offset) {
90 } 92 }
91 93
92 CommandsIssuedQuery::~CommandsIssuedQuery() { 94 CommandsIssuedQuery::~CommandsIssuedQuery() {
93 } 95 }
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 if (!RemovePendingQuery(query)) { 308 if (!RemovePendingQuery(query)) {
307 return false; 309 return false;
308 } 310 }
309 return query->End(submit_count); 311 return query->End(submit_count);
310 } 312 }
311 313
312 } // namespace gles2 314 } // namespace gles2
313 } // namespace gpu 315 } // namespace gpu
314 316
315 317
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698