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 | 9 |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 .RetiresOnSaturation(); | 728 .RetiresOnSaturation(); |
729 EXPECT_CALL(*gl_, GetError()) | 729 EXPECT_CALL(*gl_, GetError()) |
730 .WillOnce(Return(GL_NO_ERROR)) | 730 .WillOnce(Return(GL_NO_ERROR)) |
731 .RetiresOnSaturation(); | 731 .RetiresOnSaturation(); |
732 TexImage2D cmd; | 732 TexImage2D cmd; |
733 cmd.Init(target, level, internal_format, width, height, border, format, | 733 cmd.Init(target, level, internal_format, width, height, border, format, |
734 type, shared_memory_id, shared_memory_offset); | 734 type, shared_memory_id, shared_memory_offset); |
735 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 735 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
736 } | 736 } |
737 | 737 |
| 738 void GLES2DecoderTestBase::DoCompressedTexImage2D( |
| 739 GLenum target, GLint level, GLenum format, |
| 740 GLsizei width, GLsizei height, GLint border, |
| 741 GLsizei size, uint32 bucket_id) { |
| 742 EXPECT_CALL(*gl_, GetError()) |
| 743 .WillOnce(Return(GL_NO_ERROR)) |
| 744 .RetiresOnSaturation(); |
| 745 EXPECT_CALL(*gl_, CompressedTexImage2D( |
| 746 target, level, format, width, height, border, size, _)) |
| 747 .Times(1) |
| 748 .RetiresOnSaturation(); |
| 749 EXPECT_CALL(*gl_, GetError()) |
| 750 .WillOnce(Return(GL_NO_ERROR)) |
| 751 .RetiresOnSaturation(); |
| 752 CommonDecoder::Bucket* bucket = decoder_->CreateBucket(bucket_id); |
| 753 bucket->SetSize(size); |
| 754 CompressedTexImage2DBucket cmd; |
| 755 cmd.Init( |
| 756 target, level, format, width, height, border, |
| 757 bucket_id); |
| 758 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 759 } |
| 760 |
738 void GLES2DecoderTestBase::DoTexImage2DSameSize( | 761 void GLES2DecoderTestBase::DoTexImage2DSameSize( |
739 GLenum target, GLint level, GLenum internal_format, | 762 GLenum target, GLint level, GLenum internal_format, |
740 GLsizei width, GLsizei height, GLint border, | 763 GLsizei width, GLsizei height, GLint border, |
741 GLenum format, GLenum type, | 764 GLenum format, GLenum type, |
742 uint32 shared_memory_id, uint32 shared_memory_offset) { | 765 uint32 shared_memory_id, uint32 shared_memory_offset) { |
743 if (GLES2Decoder::IsAngle()) | 766 if (GLES2Decoder::IsAngle()) |
744 { | 767 { |
745 EXPECT_CALL(*gl_, TexSubImage2D( | 768 EXPECT_CALL(*gl_, TexSubImage2D( |
746 target, level, 0, 0, width, height, format, type, _)) | 769 target, level, 0, 0, width, height, format, type, _)) |
747 .Times(1) | 770 .Times(1) |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 num_vertices, buffer_id, GL_NO_ERROR); | 1218 num_vertices, buffer_id, GL_NO_ERROR); |
1196 } | 1219 } |
1197 | 1220 |
1198 void GLES2DecoderWithShaderTestBase::SetUp() { | 1221 void GLES2DecoderWithShaderTestBase::SetUp() { |
1199 GLES2DecoderTestBase::SetUp(); | 1222 GLES2DecoderTestBase::SetUp(); |
1200 SetupDefaultProgram(); | 1223 SetupDefaultProgram(); |
1201 } | 1224 } |
1202 | 1225 |
1203 } // namespace gles2 | 1226 } // namespace gles2 |
1204 } // namespace gpu | 1227 } // namespace gpu |
OLD | NEW |