OLD | NEW |
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 #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 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 .RetiresOnSaturation(); | 830 .RetiresOnSaturation(); |
831 EXPECT_CALL(*gl_, GetError()) | 831 EXPECT_CALL(*gl_, GetError()) |
832 .WillOnce(Return(GL_NO_ERROR)) | 832 .WillOnce(Return(GL_NO_ERROR)) |
833 .RetiresOnSaturation(); | 833 .RetiresOnSaturation(); |
834 cmds::TexImage2D cmd; | 834 cmds::TexImage2D cmd; |
835 cmd.Init(target, level, internal_format, width, height, border, format, | 835 cmd.Init(target, level, internal_format, width, height, border, format, |
836 type, shared_memory_id, shared_memory_offset); | 836 type, shared_memory_id, shared_memory_offset); |
837 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 837 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
838 } | 838 } |
839 | 839 |
| 840 void GLES2DecoderTestBase::DoTexImage2DConvertInternalFormat( |
| 841 GLenum target, GLint level, GLenum call_internal_format, |
| 842 GLsizei width, GLsizei height, GLint border, |
| 843 GLenum format, GLenum type, |
| 844 uint32 shared_memory_id, uint32 shared_memory_offset, |
| 845 GLenum expected_internal_format) { |
| 846 EXPECT_CALL(*gl_, GetError()) |
| 847 .WillOnce(Return(GL_NO_ERROR)) |
| 848 .RetiresOnSaturation(); |
| 849 EXPECT_CALL(*gl_, TexImage2D(target, level, expected_internal_format, |
| 850 width, height, border, format, type, _)) |
| 851 .Times(1) |
| 852 .RetiresOnSaturation(); |
| 853 EXPECT_CALL(*gl_, GetError()) |
| 854 .WillOnce(Return(GL_NO_ERROR)) |
| 855 .RetiresOnSaturation(); |
| 856 cmds::TexImage2D cmd; |
| 857 cmd.Init(target, level, call_internal_format, width, height, border, format, |
| 858 type, shared_memory_id, shared_memory_offset); |
| 859 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 860 } |
| 861 |
840 void GLES2DecoderTestBase::DoCompressedTexImage2D( | 862 void GLES2DecoderTestBase::DoCompressedTexImage2D( |
841 GLenum target, GLint level, GLenum format, | 863 GLenum target, GLint level, GLenum format, |
842 GLsizei width, GLsizei height, GLint border, | 864 GLsizei width, GLsizei height, GLint border, |
843 GLsizei size, uint32 bucket_id) { | 865 GLsizei size, uint32 bucket_id) { |
844 EXPECT_CALL(*gl_, GetError()) | 866 EXPECT_CALL(*gl_, GetError()) |
845 .WillOnce(Return(GL_NO_ERROR)) | 867 .WillOnce(Return(GL_NO_ERROR)) |
846 .RetiresOnSaturation(); | 868 .RetiresOnSaturation(); |
847 EXPECT_CALL(*gl_, CompressedTexImage2D( | 869 EXPECT_CALL(*gl_, CompressedTexImage2D( |
848 target, level, format, width, height, border, size, _)) | 870 target, level, format, width, height, border, size, _)) |
849 .Times(1) | 871 .Times(1) |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 SetupDefaultProgram(); | 1460 SetupDefaultProgram(); |
1439 } | 1461 } |
1440 | 1462 |
1441 // Include the auto-generated part of this file. We split this because it means | 1463 // Include the auto-generated part of this file. We split this because it means |
1442 // we can easily edit the non-auto generated parts right here in this file | 1464 // we can easily edit the non-auto generated parts right here in this file |
1443 // instead of having to edit some template or the code generator. | 1465 // instead of having to edit some template or the code generator. |
1444 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1466 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1445 | 1467 |
1446 } // namespace gles2 | 1468 } // namespace gles2 |
1447 } // namespace gpu | 1469 } // namespace gpu |
OLD | NEW |