OLD | NEW |
1 // Copyright (c) 2009 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.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include "gpu/command_buffer/common/gl_mock.h" | 7 #include "gpu/command_buffer/common/gl_mock.h" |
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
10 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" | 10 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
11 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 11 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
(...skipping 15 matching lines...) Expand all Loading... |
27 namespace gpu { | 27 namespace gpu { |
28 namespace gles2 { | 28 namespace gles2 { |
29 | 29 |
30 class GLES2DecoderTest1 : public GLES2DecoderTestBase { | 30 class GLES2DecoderTest1 : public GLES2DecoderTestBase { |
31 public: | 31 public: |
32 GLES2DecoderTest1() { } | 32 GLES2DecoderTest1() { } |
33 }; | 33 }; |
34 | 34 |
35 template <> | 35 template <> |
36 void GLES2DecoderTestBase::SpecializedSetup<GenerateMipmap, 0>( | 36 void GLES2DecoderTestBase::SpecializedSetup<GenerateMipmap, 0>( |
37 bool /* valid */) { | 37 bool valid) { |
38 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 38 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
39 DoTexImage2D( | 39 DoTexImage2D( |
40 GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, | 40 GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, |
41 0, 0); | 41 0, 0); |
| 42 if (valid) { |
| 43 EXPECT_CALL(*gl_, TexParameteri( |
| 44 GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR)) |
| 45 .Times(1) |
| 46 .RetiresOnSaturation(); |
| 47 EXPECT_CALL(*gl_, TexParameteri( |
| 48 GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR)) |
| 49 .Times(1) |
| 50 .RetiresOnSaturation(); |
| 51 } |
42 }; | 52 }; |
43 | 53 |
44 template <> | 54 template <> |
45 void GLES2DecoderTestBase::SpecializedSetup<CheckFramebufferStatus, 0>( | 55 void GLES2DecoderTestBase::SpecializedSetup<CheckFramebufferStatus, 0>( |
46 bool /* valid */) { | 56 bool /* valid */) { |
47 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_, | 57 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_, |
48 kServiceFramebufferId); | 58 kServiceFramebufferId); |
49 }; | 59 }; |
50 | 60 |
51 template <> | 61 template <> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 .WillOnce(Return(GL_NO_ERROR)) | 163 .WillOnce(Return(GL_NO_ERROR)) |
154 .RetiresOnSaturation(); | 164 .RetiresOnSaturation(); |
155 } | 165 } |
156 }; | 166 }; |
157 | 167 |
158 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" | 168 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" |
159 | 169 |
160 } // namespace gles2 | 170 } // namespace gles2 |
161 } // namespace gpu | 171 } // namespace gpu |
162 | 172 |
OLD | NEW |