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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 1919203003: Revert of Report lost context from GLES2Implementation based on share group state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
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 // Tests for GLES2Implementation. 5 // Tests for GLES2Implementation.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 mem.ptr = static_cast<uint8_t*>( 664 mem.ptr = static_cast<uint8_t*>(
665 gl_->mapped_memory_->Alloc(size, &mem.id, &mem.offset)); 665 gl_->mapped_memory_->Alloc(size, &mem.id, &mem.offset));
666 gl_->mapped_memory_->Free(mem.ptr); 666 gl_->mapped_memory_->Free(mem.ptr);
667 667
668 return mem; 668 return mem;
669 } 669 }
670 670
671 // Sets the ProgramInfoManager. The manager will be owned 671 // Sets the ProgramInfoManager. The manager will be owned
672 // by the ShareGroup. 672 // by the ShareGroup.
673 void SetProgramInfoManager(ProgramInfoManager* manager) { 673 void SetProgramInfoManager(ProgramInfoManager* manager) {
674 gl_->share_group()->SetProgramInfoManagerForTesting(manager); 674 gl_->share_group()->set_program_info_manager(manager);
675 } 675 }
676 676
677 int CheckError() { 677 int CheckError() {
678 ExpectedMemoryInfo result = 678 ExpectedMemoryInfo result =
679 GetExpectedResultMemory(sizeof(cmds::GetError::Result)); 679 GetExpectedResultMemory(sizeof(cmds::GetError::Result));
680 EXPECT_CALL(*command_buffer(), OnFlush()) 680 EXPECT_CALL(*command_buffer(), OnFlush())
681 .WillOnce(SetMemory(result.ptr, GLuint(GL_NO_ERROR))) 681 .WillOnce(SetMemory(result.ptr, GLuint(GL_NO_ERROR)))
682 .RetiresOnSaturation(); 682 .RetiresOnSaturation();
683 return gl_->GetError(); 683 return gl_->GetError();
684 } 684 }
(...skipping 3822 matching lines...) Expand 10 before | Expand all | Expand 10 after
4507 ContextInitOptions init_options; 4507 ContextInitOptions init_options;
4508 init_options.transfer_buffer_initialize_fail = true; 4508 init_options.transfer_buffer_initialize_fail = true;
4509 EXPECT_FALSE(Initialize(init_options)); 4509 EXPECT_FALSE(Initialize(init_options));
4510 } 4510 }
4511 4511
4512 #include "base/macros.h" 4512 #include "base/macros.h"
4513 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" 4513 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"
4514 4514
4515 } // namespace gles2 4515 } // namespace gles2
4516 } // namespace gpu 4516 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/client/gpu_control.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698