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

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

Issue 199443004: gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | no next file » | 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 "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 3267 matching lines...) Expand 10 before | Expand all | Expand 10 after
3278 return; 3278 return;
3279 } 3279 }
3280 3280
3281 // TODO(gman) if id not GENned INV_OPERATION 3281 // TODO(gman) if id not GENned INV_OPERATION
3282 3282
3283 // if id does not have an object 3283 // if id does not have an object
3284 QueryTracker::Query* query = query_tracker_->GetQuery(id); 3284 QueryTracker::Query* query = query_tracker_->GetQuery(id);
3285 if (!query) { 3285 if (!query) {
3286 query = query_tracker_->CreateQuery(id, target); 3286 query = query_tracker_->CreateQuery(id, target);
3287 if (!query) { 3287 if (!query) {
3288 MustBeContextLost(); 3288 bool context_lost = helper_->IsContextLost();
piman 2014/03/14 00:45:57 I think that was the last caller. Can you remove M
danakj 2014/03/14 01:15:49 Oh! Done.
3289 if (!context_lost) {
3290 WaitForCmd();
3291 context_lost = helper_->IsContextLost();
3292 }
3293 if (!context_lost) {
3294 SetGLError(GL_OUT_OF_MEMORY,
3295 "BeginQueryEXT",
3296 "Transfer buffer allocation failed.");
3297 }
3289 return; 3298 return;
3290 } 3299 }
3291 } else if (query->target() != target) { 3300 } else if (query->target() != target) {
3292 SetGLError( 3301 SetGLError(
3293 GL_INVALID_OPERATION, "glBeginQueryEXT", "target does not match"); 3302 GL_INVALID_OPERATION, "glBeginQueryEXT", "target does not match");
3294 return; 3303 return;
3295 } 3304 }
3296 3305
3297 current_queries_[target] = query; 3306 current_queries_[target] = query;
3298 3307
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
3921 CheckGLError(); 3930 CheckGLError();
3922 } 3931 }
3923 3932
3924 // Include the auto-generated part of this file. We split this because it means 3933 // Include the auto-generated part of this file. We split this because it means
3925 // we can easily edit the non-auto generated parts right here in this file 3934 // we can easily edit the non-auto generated parts right here in this file
3926 // instead of having to edit some template or the code generator. 3935 // instead of having to edit some template or the code generator.
3927 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 3936 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
3928 3937
3929 } // namespace gles2 3938 } // namespace gles2
3930 } // namespace gpu 3939 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698