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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 <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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/valuebuffer_manager_unittest.cc ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698