Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 10837105: Adjust Query code to handle context lost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/client/query_tracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/query_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698