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

Side by Side Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 15798014: Replace context parenting by sharing through mailboxes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 months 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/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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.h ('k') | gpu/command_buffer/tests/gl_texture_mailbox_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698