OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/service/gles2_cmd_decoder_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 using ::testing::Pointee; | 25 using ::testing::Pointee; |
26 using ::testing::Return; | 26 using ::testing::Return; |
27 using ::testing::SetArrayArgument; | 27 using ::testing::SetArrayArgument; |
28 using ::testing::SetArgumentPointee; | 28 using ::testing::SetArgumentPointee; |
29 using ::testing::StrEq; | 29 using ::testing::StrEq; |
30 using ::testing::StrictMock; | 30 using ::testing::StrictMock; |
31 | 31 |
32 namespace gpu { | 32 namespace gpu { |
33 namespace gles2 { | 33 namespace gles2 { |
34 | 34 |
| 35 GLES2DecoderTestBase::GLES2DecoderTestBase() |
| 36 : client_buffer_id_(100), |
| 37 client_framebuffer_id_(101), |
| 38 client_program_id_(102), |
| 39 client_renderbuffer_id_(103), |
| 40 client_shader_id_(104), |
| 41 client_texture_id_(106), |
| 42 client_element_buffer_id_(107) { |
| 43 memset(immediate_buffer_, 0xEE, sizeof(immediate_buffer_)); |
| 44 } |
| 45 |
| 46 GLES2DecoderTestBase::~GLES2DecoderTestBase() {} |
| 47 |
35 void GLES2DecoderTestBase::SetUp() { | 48 void GLES2DecoderTestBase::SetUp() { |
36 InitDecoder(""); | 49 InitDecoder(""); |
37 } | 50 } |
38 | 51 |
39 void GLES2DecoderTestBase::InitDecoder(const char* extensions) { | 52 void GLES2DecoderTestBase::InitDecoder(const char* extensions) { |
40 gl_.reset(new StrictMock<MockGLInterface>()); | 53 gl_.reset(new StrictMock<MockGLInterface>()); |
41 ::gfx::GLInterface::SetGLInterface(gl_.get()); | 54 ::gfx::GLInterface::SetGLInterface(gl_.get()); |
42 group_ = ContextGroup::Ref(new ContextGroup()); | 55 group_ = ContextGroup::Ref(new ContextGroup()); |
43 | 56 |
44 InSequence sequence; | 57 InSequence sequence; |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 | 797 |
785 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; | 798 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; |
786 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; | 799 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; |
787 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; | 800 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; |
788 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; | 801 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; |
789 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; | 802 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; |
790 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; | 803 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; |
791 | 804 |
792 } // namespace gles2 | 805 } // namespace gles2 |
793 } // namespace gpu | 806 } // namespace gpu |
OLD | NEW |