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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 memcpy(reinterpret_cast<char*>(shared_memory_address_) + offset, | 650 memcpy(reinterpret_cast<char*>(shared_memory_address_) + offset, |
651 &str_end, 1); | 651 &str_end, 1); |
652 offset += 1; | 652 offset += 1; |
653 } | 653 } |
654 cmd::SetBucketData cmd2; | 654 cmd::SetBucketData cmd2; |
655 cmd2.Init(bucket_id, 0, total_size, kSharedMemoryId, kSharedMemoryOffset); | 655 cmd2.Init(bucket_id, 0, total_size, kSharedMemoryId, kSharedMemoryOffset); |
656 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); | 656 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); |
657 ClearSharedMemory(); | 657 ClearSharedMemory(); |
658 } | 658 } |
659 | 659 |
660 void GLES2DecoderTestBase::SetupClearTextureExpectations( | 660 void GLES2DecoderTestBase::SetupClearTextureExpectations(GLuint service_id, |
661 GLuint service_id, | 661 GLuint old_service_id, |
662 GLuint old_service_id, | 662 GLenum bind_target, |
663 GLenum bind_target, | 663 GLenum target, |
664 GLenum target, | 664 GLint level, |
665 GLint level, | 665 GLenum internal_format, |
666 GLenum internal_format, | 666 GLenum format, |
667 GLenum format, | 667 GLenum type, |
668 GLenum type, | 668 GLint xoffset, |
669 GLsizei width, | 669 GLint yoffset, |
670 GLsizei height) { | 670 GLsizei width, |
| 671 GLsizei height) { |
671 EXPECT_CALL(*gl_, BindTexture(bind_target, service_id)) | 672 EXPECT_CALL(*gl_, BindTexture(bind_target, service_id)) |
672 .Times(1) | 673 .Times(1) |
673 .RetiresOnSaturation(); | 674 .RetiresOnSaturation(); |
674 EXPECT_CALL(*gl_, TexImage2D( | 675 EXPECT_CALL(*gl_, TexSubImage2D(target, level, xoffset, yoffset, width, |
675 target, level, internal_format, width, height, 0, format, type, _)) | 676 height, format, type, _)) |
676 .Times(1) | 677 .Times(1) |
677 .RetiresOnSaturation(); | 678 .RetiresOnSaturation(); |
678 EXPECT_CALL(*gl_, BindTexture(bind_target, old_service_id)) | 679 EXPECT_CALL(*gl_, BindTexture(bind_target, old_service_id)) |
679 .Times(1) | 680 .Times(1) |
680 .RetiresOnSaturation(); | 681 .RetiresOnSaturation(); |
681 } | 682 } |
682 | 683 |
683 void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearing( | 684 void GLES2DecoderTestBase::SetupExpectationsForFramebufferClearing( |
684 GLenum target, | 685 GLenum target, |
685 GLuint clear_bits, | 686 GLuint clear_bits, |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1815 SetupDefaultProgram(); | 1816 SetupDefaultProgram(); |
1816 } | 1817 } |
1817 | 1818 |
1818 // Include the auto-generated part of this file. We split this because it means | 1819 // Include the auto-generated part of this file. We split this because it means |
1819 // we can easily edit the non-auto generated parts right here in this file | 1820 // we can easily edit the non-auto generated parts right here in this file |
1820 // instead of having to edit some template or the code generator. | 1821 // instead of having to edit some template or the code generator. |
1821 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1822 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1822 | 1823 |
1823 } // namespace gles2 | 1824 } // namespace gles2 |
1824 } // namespace gpu | 1825 } // namespace gpu |
OLD | NEW |