OLD | NEW |
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 | 6 |
7 #include "base/atomicops.h" | 7 #include "base/atomicops.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 GLenum target, GLuint client_id, int32 shm_id, uint32 shm_offset) { | 425 GLenum target, GLuint client_id, int32 shm_id, uint32 shm_offset) { |
426 scoped_refptr<Query> query; | 426 scoped_refptr<Query> query; |
427 switch (target) { | 427 switch (target) { |
428 case GL_COMMANDS_ISSUED_CHROMIUM: | 428 case GL_COMMANDS_ISSUED_CHROMIUM: |
429 query = new CommandsIssuedQuery(this, target, shm_id, shm_offset); | 429 query = new CommandsIssuedQuery(this, target, shm_id, shm_offset); |
430 break; | 430 break; |
431 case GL_LATENCY_QUERY_CHROMIUM: | 431 case GL_LATENCY_QUERY_CHROMIUM: |
432 query = new CommandLatencyQuery(this, target, shm_id, shm_offset); | 432 query = new CommandLatencyQuery(this, target, shm_id, shm_offset); |
433 break; | 433 break; |
434 case GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM: | 434 case GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM: |
| 435 case GL_ASYNC_PIXEL_UNPACK_COMPLETED_PRIVATE_CHROMIUM: |
435 // Currently async pixel transfer delegates only support uploads. | 436 // Currently async pixel transfer delegates only support uploads. |
436 query = new AsyncPixelTransfersCompletedQuery( | 437 query = new AsyncPixelTransfersCompletedQuery( |
437 this, target, shm_id, shm_offset); | 438 this, target, shm_id, shm_offset); |
438 break; | 439 break; |
439 case GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM: | 440 case GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM: |
440 query = new AsyncReadPixelsCompletedQuery( | 441 query = new AsyncReadPixelsCompletedQuery( |
441 this, target, shm_id, shm_offset); | 442 this, target, shm_id, shm_offset); |
442 break; | 443 break; |
443 case GL_GET_ERROR_QUERY_CHROMIUM: | 444 case GL_GET_ERROR_QUERY_CHROMIUM: |
444 query = new GetErrorQuery(this, target, shm_id, shm_offset); | 445 query = new GetErrorQuery(this, target, shm_id, shm_offset); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 bool QueryManager::EndQuery(Query* query, uint32 submit_count) { | 672 bool QueryManager::EndQuery(Query* query, uint32 submit_count) { |
672 DCHECK(query); | 673 DCHECK(query); |
673 if (!RemovePendingQuery(query)) { | 674 if (!RemovePendingQuery(query)) { |
674 return false; | 675 return false; |
675 } | 676 } |
676 return query->End(submit_count); | 677 return query->End(submit_count); |
677 } | 678 } |
678 | 679 |
679 } // namespace gles2 | 680 } // namespace gles2 |
680 } // namespace gpu | 681 } // namespace gpu |
OLD | NEW |