| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 GLES2DecoderTestBase::~GLES2DecoderTestBase() {} | 48 GLES2DecoderTestBase::~GLES2DecoderTestBase() {} |
| 49 | 49 |
| 50 void GLES2DecoderTestBase::SetUp() { | 50 void GLES2DecoderTestBase::SetUp() { |
| 51 InitDecoder( | 51 InitDecoder( |
| 52 "", // extensions | 52 "", // extensions |
| 53 true, // has alpha | 53 true, // has alpha |
| 54 true, // has depth | 54 true, // has depth |
| 55 false, // has stencil | 55 false, // has stencil |
| 56 true, // request alpha | 56 true, // request alpha |
| 57 true, // request depth | 57 true, // request depth |
| 58 false); // request stencil | 58 false, // request stencil |
| 59 true); // bind generates resource |
| 59 } | 60 } |
| 60 | 61 |
| 61 void GLES2DecoderTestBase::InitDecoder( | 62 void GLES2DecoderTestBase::InitDecoder( |
| 62 const char* extensions, | 63 const char* extensions, |
| 63 bool has_alpha, | 64 bool has_alpha, |
| 64 bool has_depth, | 65 bool has_depth, |
| 65 bool has_stencil, | 66 bool has_stencil, |
| 66 bool request_alpha, | 67 bool request_alpha, |
| 67 bool request_depth, | 68 bool request_depth, |
| 68 bool request_stencil) { | 69 bool request_stencil, |
| 70 bool bind_generates_resource) { |
| 69 gl_.reset(new StrictMock<MockGLInterface>()); | 71 gl_.reset(new StrictMock<MockGLInterface>()); |
| 70 ::gfx::GLInterface::SetGLInterface(gl_.get()); | 72 ::gfx::GLInterface::SetGLInterface(gl_.get()); |
| 71 surface_manager_.reset(new StrictMock<MockSurfaceManager>); | 73 surface_manager_.reset(new StrictMock<MockSurfaceManager>); |
| 72 group_ = ContextGroup::Ref(new ContextGroup()); | 74 group_ = ContextGroup::Ref(new ContextGroup(bind_generates_resource)); |
| 73 | 75 |
| 74 InSequence sequence; | 76 InSequence sequence; |
| 75 | 77 |
| 76 TestHelper::SetupContextGroupInitExpectations(gl_.get(), | 78 TestHelper::SetupContextGroupInitExpectations(gl_.get(), |
| 77 DisallowedExtensions(), extensions); | 79 DisallowedExtensions(), extensions); |
| 78 | 80 |
| 79 EXPECT_TRUE(group_->Initialize(DisallowedExtensions(), NULL)); | 81 EXPECT_TRUE(group_->Initialize(DisallowedExtensions(), NULL)); |
| 80 | 82 |
| 81 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) | 83 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) |
| 82 .Times(1) | 84 .Times(1) |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 889 |
| 888 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; | 890 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; |
| 889 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; | 891 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; |
| 890 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; | 892 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; |
| 891 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; | 893 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; |
| 892 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; | 894 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; |
| 893 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; | 895 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; |
| 894 | 896 |
| 895 } // namespace gles2 | 897 } // namespace gles2 |
| 896 } // namespace gpu | 898 } // namespace gpu |
| OLD | NEW |