| 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/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 11614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11625 if (!query_manager_->IsValidQuery(client_id)) { | 11625 if (!query_manager_->IsValidQuery(client_id)) { |
| 11626 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, | 11626 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, |
| 11627 "glBeginQueryEXT", | 11627 "glBeginQueryEXT", |
| 11628 "id not made by glGenQueriesEXT"); | 11628 "id not made by glGenQueriesEXT"); |
| 11629 return error::kNoError; | 11629 return error::kNoError; |
| 11630 } | 11630 } |
| 11631 query = query_manager_->CreateQuery( | 11631 query = query_manager_->CreateQuery( |
| 11632 target, client_id, sync_shm_id, sync_shm_offset); | 11632 target, client_id, sync_shm_id, sync_shm_offset); |
| 11633 } | 11633 } |
| 11634 | 11634 |
| 11635 if (query->target() != target) { | 11635 if (!query->UpdateTarget(target)) { |
| 11636 LOCAL_SET_GL_ERROR( | 11636 LOCAL_SET_GL_ERROR( |
| 11637 GL_INVALID_OPERATION, "glBeginQueryEXT", "target does not match"); | 11637 GL_INVALID_OPERATION, "glBeginQueryEXT", "target does not match"); |
| 11638 return error::kNoError; | 11638 return error::kNoError; |
| 11639 } else if (query->shm_id() != sync_shm_id || | 11639 } else if (query->shm_id() != sync_shm_id || |
| 11640 query->shm_offset() != sync_shm_offset) { | 11640 query->shm_offset() != sync_shm_offset) { |
| 11641 DLOG(ERROR) << "Shared memory used by query not the same as before"; | 11641 DLOG(ERROR) << "Shared memory used by query not the same as before"; |
| 11642 return error::kInvalidArguments; | 11642 return error::kInvalidArguments; |
| 11643 } | 11643 } |
| 11644 | 11644 |
| 11645 if (!query_manager_->BeginQuery(query)) { | 11645 if (!query_manager_->BeginQuery(query)) { |
| (...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13727 } | 13727 } |
| 13728 } | 13728 } |
| 13729 | 13729 |
| 13730 // Include the auto-generated part of this file. We split this because it means | 13730 // Include the auto-generated part of this file. We split this because it means |
| 13731 // we can easily edit the non-auto generated parts right here in this file | 13731 // we can easily edit the non-auto generated parts right here in this file |
| 13732 // instead of having to edit some template or the code generator. | 13732 // instead of having to edit some template or the code generator. |
| 13733 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 13733 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 13734 | 13734 |
| 13735 } // namespace gles2 | 13735 } // namespace gles2 |
| 13736 } // namespace gpu | 13736 } // namespace gpu |
| OLD | NEW |