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 #include "gpu/command_buffer/tests/gl_manager.h" | 5 #include "gpu/command_buffer/tests/gl_manager.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
9 #include <GLES2/gl2extchromium.h> | 9 #include <GLES2/gl2extchromium.h> |
10 | 10 |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 decoder_->Destroy(true); | 316 decoder_->Destroy(true); |
317 decoder_.reset(); | 317 decoder_.reset(); |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
321 const gpu::gles2::FeatureInfo::Workarounds& GLManager::workarounds() const { | 321 const gpu::gles2::FeatureInfo::Workarounds& GLManager::workarounds() const { |
322 return decoder_->GetContextGroup()->feature_info()->workarounds(); | 322 return decoder_->GetContextGroup()->feature_info()->workarounds(); |
323 } | 323 } |
324 | 324 |
325 void GLManager::PumpCommands() { | 325 void GLManager::PumpCommands() { |
326 decoder_->MakeCurrent(); | 326 if (!decoder_->MakeCurrent()) { |
| 327 command_buffer_->SetContextLostReason(decoder_->GetContextLostReason()); |
| 328 command_buffer_->SetParseError(::gpu::error::kLostContext); |
| 329 return; |
| 330 } |
327 gpu_scheduler_->PutChanged(); | 331 gpu_scheduler_->PutChanged(); |
328 ::gpu::CommandBuffer::State state = command_buffer_->GetLastState(); | 332 ::gpu::CommandBuffer::State state = command_buffer_->GetLastState(); |
329 if (!context_lost_allowed_) { | 333 if (!context_lost_allowed_) { |
330 ASSERT_EQ(::gpu::error::kNoError, state.error); | 334 ASSERT_EQ(::gpu::error::kNoError, state.error); |
331 } | 335 } |
332 } | 336 } |
333 | 337 |
334 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { | 338 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { |
335 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); | 339 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); |
336 } | 340 } |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 void GLManager::SetSurfaceVisible(bool visible) { | 409 void GLManager::SetSurfaceVisible(bool visible) { |
406 NOTIMPLEMENTED(); | 410 NOTIMPLEMENTED(); |
407 } | 411 } |
408 | 412 |
409 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { | 413 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { |
410 NOTIMPLEMENTED(); | 414 NOTIMPLEMENTED(); |
411 return 0; | 415 return 0; |
412 } | 416 } |
413 | 417 |
414 } // namespace gpu | 418 } // namespace gpu |
OLD | NEW |