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/shared_memory.h" | 10 #include "base/shared_memory.h" |
11 #include "base/time.h" | 11 #include "base/time.h" |
12 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 12 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 13 #include "gpu/command_buffer/service/error_state.h" |
13 #include "gpu/command_buffer/service/feature_info.h" | 14 #include "gpu/command_buffer/service/feature_info.h" |
14 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 15 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
15 #include "ui/gl/async_pixel_transfer_delegate.h" | 16 #include "ui/gl/async_pixel_transfer_delegate.h" |
16 | 17 |
17 namespace gpu { | 18 namespace gpu { |
18 namespace gles2 { | 19 namespace gles2 { |
19 | 20 |
20 class AllSamplesPassedQuery : public QueryManager::Query { | 21 class AllSamplesPassedQuery : public QueryManager::Query { |
21 public: | 22 public: |
22 AllSamplesPassedQuery( | 23 AllSamplesPassedQuery( |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset) | 274 QueryManager* manager, GLenum target, int32 shm_id, uint32 shm_offset) |
274 : Query(manager, target, shm_id, shm_offset) { | 275 : Query(manager, target, shm_id, shm_offset) { |
275 } | 276 } |
276 | 277 |
277 bool GetErrorQuery::Begin() { | 278 bool GetErrorQuery::Begin() { |
278 return true; | 279 return true; |
279 } | 280 } |
280 | 281 |
281 bool GetErrorQuery::End(uint32 submit_count) { | 282 bool GetErrorQuery::End(uint32 submit_count) { |
282 MarkAsPending(submit_count); | 283 MarkAsPending(submit_count); |
283 return MarkAsCompleted(manager()->decoder()->GetGLError()); | 284 return MarkAsCompleted(manager()->decoder()->GetErrorState()->GetGLError()); |
284 } | 285 } |
285 | 286 |
286 bool GetErrorQuery::Process() { | 287 bool GetErrorQuery::Process() { |
287 NOTREACHED(); | 288 NOTREACHED(); |
288 return true; | 289 return true; |
289 } | 290 } |
290 | 291 |
291 void GetErrorQuery::Destroy(bool /* have_context */) { | 292 void GetErrorQuery::Destroy(bool /* have_context */) { |
292 if (!IsDeleted()) { | 293 if (!IsDeleted()) { |
293 MarkAsDeleted(); | 294 MarkAsDeleted(); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 if (!RemovePendingQuery(query)) { | 557 if (!RemovePendingQuery(query)) { |
557 return false; | 558 return false; |
558 } | 559 } |
559 return query->End(submit_count); | 560 return query->End(submit_count); |
560 } | 561 } |
561 | 562 |
562 } // namespace gles2 | 563 } // namespace gles2 |
563 } // namespace gpu | 564 } // namespace gpu |
564 | 565 |
565 | 566 |
OLD | NEW |