| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 if (gles2_implementation_.get()) { | 397 if (gles2_implementation_.get()) { |
| 398 MakeCurrent(); | 398 MakeCurrent(); |
| 399 EXPECT_TRUE(glGetError() == GL_NONE); | 399 EXPECT_TRUE(glGetError() == GL_NONE); |
| 400 gles2_implementation_->Flush(); | 400 gles2_implementation_->Flush(); |
| 401 gles2_implementation_.reset(); | 401 gles2_implementation_.reset(); |
| 402 } | 402 } |
| 403 transfer_buffer_.reset(); | 403 transfer_buffer_.reset(); |
| 404 gles2_helper_.reset(); | 404 gles2_helper_.reset(); |
| 405 command_buffer_.reset(); | 405 command_buffer_.reset(); |
| 406 if (decoder_.get()) { | 406 if (decoder_.get()) { |
| 407 decoder_->MakeCurrent(); | 407 bool have_context = decoder_->GetGLContext()->MakeCurrent(surface_.get()); |
| 408 decoder_->Destroy(true); | 408 decoder_->Destroy(have_context); |
| 409 decoder_.reset(); | 409 decoder_.reset(); |
| 410 } | 410 } |
| 411 } | 411 } |
| 412 | 412 |
| 413 const gpu::gles2::FeatureInfo::Workarounds& GLManager::workarounds() const { | 413 const gpu::gles2::FeatureInfo::Workarounds& GLManager::workarounds() const { |
| 414 return decoder_->GetContextGroup()->feature_info()->workarounds(); | 414 return decoder_->GetContextGroup()->feature_info()->workarounds(); |
| 415 } | 415 } |
| 416 | 416 |
| 417 void GLManager::PumpCommands() { | 417 void GLManager::PumpCommands() { |
| 418 if (!decoder_->MakeCurrent()) { | 418 if (!decoder_->MakeCurrent()) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { | 505 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { |
| 506 NOTIMPLEMENTED(); | 506 NOTIMPLEMENTED(); |
| 507 return 0; | 507 return 0; |
| 508 } | 508 } |
| 509 | 509 |
| 510 void GLManager::SetLock(base::Lock*) { | 510 void GLManager::SetLock(base::Lock*) { |
| 511 NOTIMPLEMENTED(); | 511 NOTIMPLEMENTED(); |
| 512 } | 512 } |
| 513 | 513 |
| 514 } // namespace gpu | 514 } // namespace gpu |
| OLD | NEW |