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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 EXPECT_TRUE(glGetError() == GL_NONE); | 242 EXPECT_TRUE(glGetError() == GL_NONE); |
243 gles2_implementation_->Flush(); | 243 gles2_implementation_->Flush(); |
244 gles2_implementation_.reset(); | 244 gles2_implementation_.reset(); |
245 } | 245 } |
246 transfer_buffer_.reset(); | 246 transfer_buffer_.reset(); |
247 gles2_helper_.reset(); | 247 gles2_helper_.reset(); |
248 command_buffer_.reset(); | 248 command_buffer_.reset(); |
249 if (decoder_.get()) { | 249 if (decoder_.get()) { |
250 decoder_->MakeCurrent(); | 250 decoder_->MakeCurrent(); |
251 decoder_->Destroy(true); | 251 decoder_->Destroy(true); |
| 252 decoder_.reset(); |
252 } | 253 } |
253 } | 254 } |
254 | 255 |
255 void GLManager::PumpCommands() { | 256 void GLManager::PumpCommands() { |
256 decoder_->MakeCurrent(); | 257 decoder_->MakeCurrent(); |
257 gpu_scheduler_->PutChanged(); | 258 gpu_scheduler_->PutChanged(); |
258 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); | 259 ::gpu::CommandBuffer::State state = command_buffer_->GetState(); |
259 if (!context_lost_allowed_) { | 260 if (!context_lost_allowed_) { |
260 ASSERT_EQ(::gpu::error::kNoError, state.error); | 261 ASSERT_EQ(::gpu::error::kNoError, state.error); |
261 } | 262 } |
262 } | 263 } |
263 | 264 |
264 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { | 265 bool GLManager::GetBufferChanged(int32 transfer_buffer_id) { |
265 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); | 266 return gpu_scheduler_->SetGetBuffer(transfer_buffer_id); |
266 } | 267 } |
267 | 268 |
268 } // namespace gpu | 269 } // namespace gpu |
OLD | NEW |