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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 gl_.reset(new StrictMock<MockGLInterface>()); | 69 gl_.reset(new StrictMock<MockGLInterface>()); |
70 ::gfx::GLInterface::SetGLInterface(gl_.get()); | 70 ::gfx::GLInterface::SetGLInterface(gl_.get()); |
71 surface_manager_.reset(new StrictMock<MockSurfaceManager>); | 71 surface_manager_.reset(new StrictMock<MockSurfaceManager>); |
72 group_ = ContextGroup::Ref(new ContextGroup()); | 72 group_ = ContextGroup::Ref(new ContextGroup()); |
73 | 73 |
74 InSequence sequence; | 74 InSequence sequence; |
75 | 75 |
76 TestHelper::SetupContextGroupInitExpectations(gl_.get(), | 76 TestHelper::SetupContextGroupInitExpectations(gl_.get(), |
77 DisallowedExtensions(), extensions); | 77 DisallowedExtensions(), extensions); |
78 | 78 |
79 EXPECT_TRUE(group_->Initialize(DisallowedExtensions(), NULL)); | 79 EXPECT_TRUE(group_->Initialize(DisallowedExtensions(), extensions)); |
no sievers
2011/07/20 00:58:16
Is it intentional that we pass NULL here which end
greggman
2011/07/20 01:41:18
Yes, NULL for that parameter means "give me all ex
no sievers
2011/07/20 23:00:37
I think I confused myself here due to a typo I had
| |
80 | 80 |
81 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) | 81 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) |
82 .Times(1) | 82 .Times(1) |
83 .RetiresOnSaturation(); | 83 .RetiresOnSaturation(); |
84 static GLuint attrib_0_id[] = { | 84 static GLuint attrib_0_id[] = { |
85 kServiceAttrib0BufferId, | 85 kServiceAttrib0BufferId, |
86 }; | 86 }; |
87 static GLuint fixed_attrib_buffer_id[] = { | 87 static GLuint fixed_attrib_buffer_id[] = { |
88 kServiceFixedAttribBufferId, | 88 kServiceFixedAttribBufferId, |
89 }; | 89 }; |
(...skipping 13 matching lines...) Expand all Loading... | |
103 EXPECT_CALL(*gl_, GenBuffersARB(arraysize(fixed_attrib_buffer_id), _)) | 103 EXPECT_CALL(*gl_, GenBuffersARB(arraysize(fixed_attrib_buffer_id), _)) |
104 .WillOnce(SetArrayArgument<1>( | 104 .WillOnce(SetArrayArgument<1>( |
105 fixed_attrib_buffer_id, | 105 fixed_attrib_buffer_id, |
106 fixed_attrib_buffer_id + arraysize(fixed_attrib_buffer_id))) | 106 fixed_attrib_buffer_id + arraysize(fixed_attrib_buffer_id))) |
107 .RetiresOnSaturation(); | 107 .RetiresOnSaturation(); |
108 | 108 |
109 for (GLint tt = 0; tt < TestHelper::kNumTextureUnits; ++tt) { | 109 for (GLint tt = 0; tt < TestHelper::kNumTextureUnits; ++tt) { |
110 EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE0 + tt)) | 110 EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE0 + tt)) |
111 .Times(1) | 111 .Times(1) |
112 .RetiresOnSaturation(); | 112 .RetiresOnSaturation(); |
113 if (group_->feature_info()->feature_flags().oes_egl_image_external) { | |
114 EXPECT_CALL(*gl_, BindTexture( | |
115 GL_TEXTURE_EXTERNAL_OES, | |
116 TestHelper::kServiceDefaultExternalTextureId)) | |
117 .Times(1) | |
118 .RetiresOnSaturation(); | |
119 } | |
113 EXPECT_CALL(*gl_, BindTexture( | 120 EXPECT_CALL(*gl_, BindTexture( |
114 GL_TEXTURE_CUBE_MAP, TestHelper::kServiceDefaultTextureCubemapId)) | 121 GL_TEXTURE_CUBE_MAP, TestHelper::kServiceDefaultTextureCubemapId)) |
115 .Times(1) | 122 .Times(1) |
116 .RetiresOnSaturation(); | 123 .RetiresOnSaturation(); |
117 EXPECT_CALL(*gl_, BindTexture( | 124 EXPECT_CALL(*gl_, BindTexture( |
118 GL_TEXTURE_2D, TestHelper::kServiceDefaultTexture2dId)) | 125 GL_TEXTURE_2D, TestHelper::kServiceDefaultTexture2dId)) |
119 .Times(1) | 126 .Times(1) |
120 .RetiresOnSaturation(); | 127 .RetiresOnSaturation(); |
121 } | 128 } |
122 EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE0)) | 129 EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE0)) |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
881 | 888 |
882 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; | 889 const char* GLES2DecoderWithShaderTestBase::kAttrib1Name = "attrib1"; |
883 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; | 890 const char* GLES2DecoderWithShaderTestBase::kAttrib2Name = "attrib2"; |
884 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; | 891 const char* GLES2DecoderWithShaderTestBase::kAttrib3Name = "attrib3"; |
885 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; | 892 const char* GLES2DecoderWithShaderTestBase::kUniform1Name = "uniform1"; |
886 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; | 893 const char* GLES2DecoderWithShaderTestBase::kUniform2Name = "uniform2[0]"; |
887 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; | 894 const char* GLES2DecoderWithShaderTestBase::kUniform3Name = "uniform3[0]"; |
888 | 895 |
889 } // namespace gles2 | 896 } // namespace gles2 |
890 } // namespace gpu | 897 } // namespace gpu |
OLD | NEW |