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 | 10 |
10 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
11 #include "gpu/command_buffer/common/gl_mock.h" | 12 #include "gpu/command_buffer/common/gl_mock.h" |
12 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 13 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
13 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 14 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
14 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 15 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
15 #include "gpu/command_buffer/service/context_group.h" | 16 #include "gpu/command_buffer/service/context_group.h" |
16 #include "gpu/command_buffer/service/program_manager.h" | 17 #include "gpu/command_buffer/service/program_manager.h" |
17 #include "gpu/command_buffer/service/test_helper.h" | 18 #include "gpu/command_buffer/service/test_helper.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 target, level, format, width, height, border, | 868 target, level, format, width, height, border, |
868 bucket_id); | 869 bucket_id); |
869 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 870 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
870 } | 871 } |
871 | 872 |
872 void GLES2DecoderTestBase::DoTexImage2DSameSize( | 873 void GLES2DecoderTestBase::DoTexImage2DSameSize( |
873 GLenum target, GLint level, GLenum internal_format, | 874 GLenum target, GLint level, GLenum internal_format, |
874 GLsizei width, GLsizei height, GLint border, | 875 GLsizei width, GLsizei height, GLint border, |
875 GLenum format, GLenum type, | 876 GLenum format, GLenum type, |
876 uint32 shared_memory_id, uint32 shared_memory_offset) { | 877 uint32 shared_memory_id, uint32 shared_memory_offset) { |
877 if (GLES2Decoder::IsAngle()) | 878 if (GLES2Decoder::IsAngle()) { |
878 { | |
879 EXPECT_CALL(*gl_, TexSubImage2D( | 879 EXPECT_CALL(*gl_, TexSubImage2D( |
880 target, level, 0, 0, width, height, format, type, _)) | 880 target, level, 0, 0, width, height, format, type, _)) |
881 .Times(1) | 881 .Times(1) |
882 .RetiresOnSaturation(); | 882 .RetiresOnSaturation(); |
883 } else { | 883 } else { |
884 EXPECT_CALL(*gl_, GetError()) | 884 EXPECT_CALL(*gl_, GetError()) |
885 .WillOnce(Return(GL_NO_ERROR)) | 885 .WillOnce(Return(GL_NO_ERROR)) |
886 .RetiresOnSaturation(); | 886 .RetiresOnSaturation(); |
887 EXPECT_CALL(*gl_, TexImage2D(target, level, internal_format, | 887 EXPECT_CALL(*gl_, TexImage2D(target, level, internal_format, |
888 width, height, border, format, type, _)) | 888 width, height, border, format, type, _)) |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1334 num_vertices, buffer_id, GL_NO_ERROR); | 1334 num_vertices, buffer_id, GL_NO_ERROR); |
1335 } | 1335 } |
1336 | 1336 |
1337 void GLES2DecoderWithShaderTestBase::SetUp() { | 1337 void GLES2DecoderWithShaderTestBase::SetUp() { |
1338 GLES2DecoderTestBase::SetUp(); | 1338 GLES2DecoderTestBase::SetUp(); |
1339 SetupDefaultProgram(); | 1339 SetupDefaultProgram(); |
1340 } | 1340 } |
1341 | 1341 |
1342 } // namespace gles2 | 1342 } // namespace gles2 |
1343 } // namespace gpu | 1343 } // namespace gpu |
OLD | NEW |