Index: gpu/command_buffer/tests/gl_manager.cc |
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc |
index 6ec309755a0bde61dc26de58aa2135ed773973cf..57abc341d77fed024898b857abe5bfe7ca537157 100644 |
--- a/gpu/command_buffer/tests/gl_manager.cc |
+++ b/gpu/command_buffer/tests/gl_manager.cc |
@@ -29,10 +29,12 @@ GLManager::Options::Options() |
share_group_manager(NULL), |
share_mailbox_manager(NULL), |
virtual_manager(NULL), |
- bind_generates_resource(false) { |
+ bind_generates_resource(false), |
+ context_lost_allowed(false) { |
} |
-GLManager::GLManager() { |
+GLManager::GLManager() |
+ : context_lost_allowed_(false) { |
} |
GLManager::~GLManager() { |
@@ -45,6 +47,8 @@ void GLManager::Initialize(const GLManager::Options& options) { |
const size_t kMaxTransferBufferSize = 16 * 1024 * 1024; |
const bool kShareResources = true; |
+ context_lost_allowed_ = options.context_lost_allowed; |
+ |
gles2::MailboxManager* mailbox_manager = NULL; |
if (options.share_mailbox_manager) { |
mailbox_manager = options.share_mailbox_manager->mailbox_manager(); |
@@ -198,7 +202,9 @@ void GLManager::PumpCommands() { |
decoder_->MakeCurrent(); |
gpu_scheduler_->PutChanged(); |
::gpu::CommandBuffer::State state = command_buffer_->GetState(); |
- ASSERT_EQ(::gpu::error::kNoError, state.error); |
+ if (!context_lost_allowed_) { |
+ ASSERT_EQ(::gpu::error::kNoError, state.error); |
+ } |
} |
bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { |