Lines Matching refs:Query
59 : public QueryManager::Query,
78 : Query(manager, target, shm_id, shm_offset) {
116 // query.
137 class AllSamplesPassedQuery : public QueryManager::Query {
151 // Service side query id.
158 : Query(manager, target, shm_id, shm_offset),
196 class CommandsIssuedQuery : public QueryManager::Query {
215 : Query(manager, target, shm_id, shm_offset) {
243 class CommandLatencyQuery : public QueryManager::Query {
259 : Query(manager, target, shm_id, shm_offset) {
288 : public QueryManager::Query,
310 : Query(manager, target, shm_id, shm_offset),
349 class GetErrorQuery : public QueryManager::Query {
367 : Query(manager, target, shm_id, shm_offset) {
393 class CommandsCompletedQuery : public QueryManager::Query {
400 // Overridden from QueryManager::Query:
417 : Query(manager, target, shm_id, shm_offset) {}
461 // a Query belonging to this.
469 Query* query = queries_.begin()->second.get();
470 query->Destroy(have_context);
475 QueryManager::Query* QueryManager::CreateQuery(
477 scoped_refptr<Query> query;
480 query = new CommandsIssuedQuery(this, target, shm_id, shm_offset);
483 query = new CommandLatencyQuery(this, target, shm_id, shm_offset);
487 query = new AsyncPixelTransfersCompletedQuery(
491 query = new AsyncReadPixelsCompletedQuery(
495 query = new GetErrorQuery(this, target, shm_id, shm_offset);
498 query = new CommandsCompletedQuery(this, target, shm_id, shm_offset);
504 query = new AllSamplesPassedQuery(
510 queries_.insert(std::make_pair(client_id, query));
512 return query.get();
527 QueryManager::Query* QueryManager::GetQuery(
536 Query* query = it->second.get();
537 RemovePendingQuery(query);
538 query->MarkAsDeleted();
544 void QueryManager::StartTracking(QueryManager::Query* /* query */) {
548 void QueryManager::StopTracking(QueryManager::Query* /* query */) {
584 QueryManager::Query::Query(
597 void QueryManager::Query::RunCallbacks() {
604 void QueryManager::Query::AddCallback(base::Closure callback) {
612 QueryManager::Query::~Query() {
613 // The query is getting deleted, either by the client or
623 bool QueryManager::Query::MarkAsCompleted(uint64 result) {
640 Query* query = pending_queries_.front().get();
641 if (!query->Process()) {
644 if (query->pending()) {
647 query->RunCallbacks();
660 Query* query = pending_transfer_queries_.front().get();
661 if (!query->Process()) {
664 if (query->pending()) {
667 query->RunCallbacks();
678 bool QueryManager::AddPendingQuery(Query* query,
680 DCHECK(query);
681 DCHECK(!query->IsDeleted());
682 if (!RemovePendingQuery(query)) {
685 query->MarkAsPending(submit_count);
686 pending_queries_.push_back(query);
691 Query* query,
693 DCHECK(query);
694 DCHECK(!query->IsDeleted());
695 if (!RemovePendingQuery(query)) {
698 query->MarkAsPending(submit_count);
699 pending_transfer_queries_.push_back(query);
703 bool QueryManager::RemovePendingQuery(Query* query) {
704 DCHECK(query);
705 if (query->pending()) {
707 // happen if you do being/end begin/end on the same query without waiting
711 if (it->get() == query) {
718 if (it->get() == query) {
723 if (!query->MarkAsCompleted(0)) {
730 bool QueryManager::BeginQuery(Query* query) {
731 DCHECK(query);
732 if (!RemovePendingQuery(query)) {
735 return query->Begin();
738 bool QueryManager::EndQuery(Query* query, base::subtle::Atomic32 submit_count) {
739 DCHECK(query);
740 if (!RemovePendingQuery(query)) {
743 return query->End(submit_count);