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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 11568029: Add a command to lose the context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
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 #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 <list> 10 #include <list>
(...skipping 3325 matching lines...) Expand 10 before | Expand all | Expand 10 after
3336 } else { 3336 } else {
3337 result = DoCommonCommand(command, arg_count, cmd_data); 3337 result = DoCommonCommand(command, arg_count, cmd_data);
3338 } 3338 }
3339 if (result == error::kNoError && current_decoder_error_ != error::kNoError) { 3339 if (result == error::kNoError && current_decoder_error_ != error::kNoError) {
3340 result = current_decoder_error_; 3340 result = current_decoder_error_;
3341 current_decoder_error_ = error::kNoError; 3341 current_decoder_error_ = error::kNoError;
3342 } 3342 }
3343 return result; 3343 return result;
3344 } 3344 }
3345 3345
3346 error::Error GLES2DecoderImpl::HandleLoseContextCHROMIUM(
3347 uint32 immediate_data_size, const gles2::LoseContextCHROMIUM& c) {
3348 // TODO(gman): I suspect it's not this simple. The most common context
3349 // lost event is currently the GPU process crashing which will take down all
3350 // contexts. After that, it seems likely you'd want to lose all contexts in
3351 // the current ContextGroup otherwise you'll likely leak resources.
Ken Russell (switch to Gerrit) 2012/12/15 01:21:28 Yes -- I think the command should lose all context
3352 return error::kLostContext;
3353 }
3354
3346 void GLES2DecoderImpl::RemoveBufferInfo(GLuint client_id) { 3355 void GLES2DecoderImpl::RemoveBufferInfo(GLuint client_id) {
3347 buffer_manager()->RemoveBufferInfo(client_id); 3356 buffer_manager()->RemoveBufferInfo(client_id);
3348 } 3357 }
3349 3358
3350 bool GLES2DecoderImpl::CreateProgramHelper(GLuint client_id) { 3359 bool GLES2DecoderImpl::CreateProgramHelper(GLuint client_id) {
3351 if (GetProgramInfo(client_id)) { 3360 if (GetProgramInfo(client_id)) {
3352 return false; 3361 return false;
3353 } 3362 }
3354 GLuint service_id = glCreateProgram(); 3363 GLuint service_id = glCreateProgram();
3355 if (service_id != 0) { 3364 if (service_id != 0) {
(...skipping 6380 matching lines...) Expand 10 before | Expand all | Expand 10 after
9736 target, level, xoffset, yoffset, width, height, format, type, pixels); 9745 target, level, xoffset, yoffset, width, height, format, type, pixels);
9737 } 9746 }
9738 9747
9739 // Include the auto-generated part of this file. We split this because it means 9748 // Include the auto-generated part of this file. We split this because it means
9740 // we can easily edit the non-auto generated parts right here in this file 9749 // we can easily edit the non-auto generated parts right here in this file
9741 // instead of having to edit some template or the code generator. 9750 // instead of having to edit some template or the code generator.
9742 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 9751 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
9743 9752
9744 } // namespace gles2 9753 } // namespace gles2
9745 } // namespace gpu 9754 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698