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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
6 | 6 |
7 #include "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 3041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3052 } | 3052 } |
3053 | 3053 |
3054 for (GLsizei ii = 0; ii < n; ++ii) { | 3054 for (GLsizei ii = 0; ii < n; ++ii) { |
3055 QueryTracker::Query* query = query_tracker_->GetQuery(queries[ii]); | 3055 QueryTracker::Query* query = query_tracker_->GetQuery(queries[ii]); |
3056 if (query && query->Pending()) { | 3056 if (query && query->Pending()) { |
3057 if (!query->CheckResultsAvailable(helper_)) { | 3057 if (!query->CheckResultsAvailable(helper_)) { |
3058 // Should only get here on context lost. | 3058 // Should only get here on context lost. |
3059 MustBeContextLost(); | 3059 MustBeContextLost(); |
3060 } | 3060 } |
3061 } | 3061 } |
3062 query_tracker_->RemoveQuery(queries[ii]); | 3062 query_tracker_->RemoveQuery(queries[ii], context_lost_); |
3063 } | 3063 } |
3064 helper_->DeleteQueriesEXTImmediate(n, queries); | 3064 helper_->DeleteQueriesEXTImmediate(n, queries); |
3065 } | 3065 } |
3066 | 3066 |
3067 // TODO(gman): Remove this. Queries are not shared resources. | 3067 // TODO(gman): Remove this. Queries are not shared resources. |
3068 void GLES2Implementation::DeleteQueriesStub( | 3068 void GLES2Implementation::DeleteQueriesStub( |
3069 GLsizei /* n */, const GLuint* /* queries */) { | 3069 GLsizei /* n */, const GLuint* /* queries */) { |
3070 } | 3070 } |
3071 | 3071 |
3072 GLboolean GLES2Implementation::IsQueryEXT(GLuint id) { | 3072 GLboolean GLES2Implementation::IsQueryEXT(GLuint id) { |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3324 helper_->GenMailboxCHROMIUM(kResultBucketId); | 3324 helper_->GenMailboxCHROMIUM(kResultBucketId); |
3325 | 3325 |
3326 std::vector<GLbyte> result; | 3326 std::vector<GLbyte> result; |
3327 GetBucketContents(kResultBucketId, &result); | 3327 GetBucketContents(kResultBucketId, &result); |
3328 | 3328 |
3329 std::copy(result.begin(), result.end(), mailbox); | 3329 std::copy(result.begin(), result.end(), mailbox); |
3330 } | 3330 } |
3331 | 3331 |
3332 } // namespace gles2 | 3332 } // namespace gles2 |
3333 } // namespace gpu | 3333 } // namespace gpu |
OLD | NEW |