Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc

Issue 9968113: Addition of GL_CHROMIUM_copy_texture extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unnecessary white-space. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.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/common/gl_mock.h" 10 #include "gpu/command_buffer/common/gl_mock.h"
(...skipping 3507 matching lines...) Expand 10 before | Expand all | Expand 10 after
3518 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 3518 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
3519 SetupExpectationsForApplyingDirtyState( 3519 SetupExpectationsForApplyingDirtyState(
3520 true, // Framebuffer is RGB 3520 true, // Framebuffer is RGB
3521 false, // Framebuffer has depth 3521 false, // Framebuffer has depth
3522 false, // Framebuffer has stencil 3522 false, // Framebuffer has stencil
3523 0x1110, // color bits 3523 0x1110, // color bits
3524 false, // depth mask 3524 false, // depth mask
3525 false, // depth enabled 3525 false, // depth enabled
3526 0, // front stencil mask 3526 0, // front stencil mask
3527 0, // back stencil mask 3527 0, // back stencil mask
3528 false); // stencil enabled 3528 false, // stencil enabled
3529 false, // cull_face_enabled
3530 false); // scissor_test_enabled
3529 3531
3530 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 3532 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
3531 .Times(1) 3533 .Times(1)
3532 .RetiresOnSaturation(); 3534 .RetiresOnSaturation();
3533 DrawArrays draw_cmd; 3535 DrawArrays draw_cmd;
3534 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); 3536 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices);
3535 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 3537 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
3536 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3538 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3537 3539
3538 EXPECT_CALL(*gl_, GetError()) 3540 EXPECT_CALL(*gl_, GetError())
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
3572 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 3574 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
3573 SetupExpectationsForApplyingDirtyState( 3575 SetupExpectationsForApplyingDirtyState(
3574 true, // Framebuffer is RGB 3576 true, // Framebuffer is RGB
3575 false, // Framebuffer has depth 3577 false, // Framebuffer has depth
3576 false, // Framebuffer has stencil 3578 false, // Framebuffer has stencil
3577 0x1110, // color bits 3579 0x1110, // color bits
3578 false, // depth mask 3580 false, // depth mask
3579 false, // depth enabled 3581 false, // depth enabled
3580 0, // front stencil mask 3582 0, // front stencil mask
3581 0, // back stencil mask 3583 0, // back stencil mask
3582 false); // stencil enabled 3584 false, // stencil enabled
3585 false, // cull_face_enabled
3586 false); // scissor_test_enabled
3583 3587
3584 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 3588 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
3585 .Times(1) 3589 .Times(1)
3586 .RetiresOnSaturation(); 3590 .RetiresOnSaturation();
3587 DrawArrays draw_cmd; 3591 DrawArrays draw_cmd;
3588 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); 3592 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices);
3589 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 3593 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
3590 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3594 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3591 3595
3592 EXPECT_CALL(*gl_, GetError()) 3596 EXPECT_CALL(*gl_, GetError())
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3624 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 3628 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
3625 SetupExpectationsForApplyingDirtyState( 3629 SetupExpectationsForApplyingDirtyState(
3626 true, // Framebuffer is RGB 3630 true, // Framebuffer is RGB
3627 false, // Framebuffer has depth 3631 false, // Framebuffer has depth
3628 false, // Framebuffer has stencil 3632 false, // Framebuffer has stencil
3629 0x1110, // color bits 3633 0x1110, // color bits
3630 false, // depth mask 3634 false, // depth mask
3631 false, // depth enabled 3635 false, // depth enabled
3632 0, // front stencil mask 3636 0, // front stencil mask
3633 0, // back stencil mask 3637 0, // back stencil mask
3634 false); // stencil enabled 3638 false, // stencil enabled
3639 false, // cull_face_enabled
3640 false); // scissor_test_enabled
3641
3635 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 3642 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
3636 .Times(1) 3643 .Times(1)
3637 .RetiresOnSaturation(); 3644 .RetiresOnSaturation();
3638 DrawArrays draw_cmd; 3645 DrawArrays draw_cmd;
3639 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); 3646 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices);
3640 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 3647 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
3641 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3648 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3642 3649
3643 EXPECT_CALL(*gl_, GetError()) 3650 EXPECT_CALL(*gl_, GetError())
3644 .WillOnce(Return(GL_NO_ERROR)) 3651 .WillOnce(Return(GL_NO_ERROR))
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3676 DoVertexAttribPointer(2, 2, GL_FLOAT, 0, 0); 3683 DoVertexAttribPointer(2, 2, GL_FLOAT, 0, 0);
3677 SetupExpectationsForApplyingDirtyState( 3684 SetupExpectationsForApplyingDirtyState(
3678 true, // Framebuffer is RGB 3685 true, // Framebuffer is RGB
3679 false, // Framebuffer has depth 3686 false, // Framebuffer has depth
3680 false, // Framebuffer has stencil 3687 false, // Framebuffer has stencil
3681 0x1110, // color bits 3688 0x1110, // color bits
3682 false, // depth mask 3689 false, // depth mask
3683 false, // depth enabled 3690 false, // depth enabled
3684 0, // front stencil mask 3691 0, // front stencil mask
3685 0, // back stencil mask 3692 0, // back stencil mask
3686 false); // stencil enabled 3693 false, // stencil enabled
3694 false, // cull_face_enabled
3695 false); // scissor_test_enabled
3687 3696
3688 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 3697 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
3689 .Times(1) 3698 .Times(1)
3690 .RetiresOnSaturation(); 3699 .RetiresOnSaturation();
3691 DrawArrays draw_cmd; 3700 DrawArrays draw_cmd;
3692 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); 3701 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices);
3693 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 3702 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
3694 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3703 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3695 3704
3696 // Check that no extra calls are made on the next draw. 3705 // Check that no extra calls are made on the next draw.
(...skipping 25 matching lines...) Expand all
3722 // This time state needs to be set. 3731 // This time state needs to be set.
3723 SetupExpectationsForApplyingDirtyState( 3732 SetupExpectationsForApplyingDirtyState(
3724 false, // Framebuffer is RGB 3733 false, // Framebuffer is RGB
3725 false, // Framebuffer has depth 3734 false, // Framebuffer has depth
3726 false, // Framebuffer has stencil 3735 false, // Framebuffer has stencil
3727 0x1110, // color bits 3736 0x1110, // color bits
3728 false, // depth mask 3737 false, // depth mask
3729 false, // depth enabled 3738 false, // depth enabled
3730 0, // front stencil mask 3739 0, // front stencil mask
3731 0, // back stencil mask 3740 0, // back stencil mask
3732 false); // stencil enabled 3741 false, // stencil enabled
3742 false, // cull_face_enabled
3743 false); // scissor_test_enabled
3744
3733 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 3745 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
3734 .Times(1) 3746 .Times(1)
3735 .RetiresOnSaturation(); 3747 .RetiresOnSaturation();
3736 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 3748 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
3737 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3749 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3738 3750
3739 // Check that no extra calls are made on the next draw. 3751 // Check that no extra calls are made on the next draw.
3740 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 3752 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
3741 .Times(1) 3753 .Times(1)
3742 .RetiresOnSaturation(); 3754 .RetiresOnSaturation();
3743 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 3755 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
3744 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3756 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3745 3757
3746 // Unbind 3758 // Unbind
3747 DoBindFramebuffer(GL_FRAMEBUFFER, 0, 0); 3759 DoBindFramebuffer(GL_FRAMEBUFFER, 0, 0);
3748 3760
3749 SetupExpectationsForApplyingDirtyState( 3761 SetupExpectationsForApplyingDirtyState(
3750 true, // Framebuffer is RGB 3762 true, // Framebuffer is RGB
3751 false, // Framebuffer has depth 3763 false, // Framebuffer has depth
3752 false, // Framebuffer has stencil 3764 false, // Framebuffer has stencil
3753 0x1110, // color bits 3765 0x1110, // color bits
3754 false, // depth mask 3766 false, // depth mask
3755 false, // depth enabled 3767 false, // depth enabled
3756 0, // front stencil mask 3768 0, // front stencil mask
3757 0, // back stencil mask 3769 0, // back stencil mask
3758 false); // stencil enabled 3770 false, // stencil enabled
3771 false, // cull_face_enabled
3772 false); // scissor_test_enabled
3759 3773
3760 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 3774 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
3761 .Times(1) 3775 .Times(1)
3762 .RetiresOnSaturation(); 3776 .RetiresOnSaturation();
3763 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 3777 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
3764 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3778 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3765 } 3779 }
3766 3780
3767 TEST_F(GLES2DecoderManualInitTest, ActualAlphaMatchesRequestedAlpha) { 3781 TEST_F(GLES2DecoderManualInitTest, ActualAlphaMatchesRequestedAlpha) {
3768 InitDecoder( 3782 InitDecoder(
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
3971 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 3985 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
3972 SetupExpectationsForApplyingDirtyState( 3986 SetupExpectationsForApplyingDirtyState(
3973 true, // Framebuffer is RGB 3987 true, // Framebuffer is RGB
3974 true, // Framebuffer has depth 3988 true, // Framebuffer has depth
3975 false, // Framebuffer has stencil 3989 false, // Framebuffer has stencil
3976 0x1110, // color bits 3990 0x1110, // color bits
3977 true, // depth mask 3991 true, // depth mask
3978 true, // depth enabled 3992 true, // depth enabled
3979 0, // front stencil mask 3993 0, // front stencil mask
3980 0, // back stencil mask 3994 0, // back stencil mask
3981 false); // stencil enabled 3995 false, // stencil enabled
3996 false, // cull_face_enabled
3997 false); // scissor_test_enabled
3998
3982 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 3999 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
3983 .Times(1) 4000 .Times(1)
3984 .RetiresOnSaturation(); 4001 .RetiresOnSaturation();
3985 DrawArrays draw_cmd; 4002 DrawArrays draw_cmd;
3986 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); 4003 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices);
3987 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 4004 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
3988 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 4005 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3989 4006
3990 EXPECT_CALL(*gl_, GetError()) 4007 EXPECT_CALL(*gl_, GetError())
3991 .WillOnce(Return(GL_NO_ERROR)) 4008 .WillOnce(Return(GL_NO_ERROR))
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
4028 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 4045 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
4029 SetupExpectationsForApplyingDirtyState( 4046 SetupExpectationsForApplyingDirtyState(
4030 true, // Framebuffer is RGB 4047 true, // Framebuffer is RGB
4031 false, // Framebuffer has depth 4048 false, // Framebuffer has depth
4032 false, // Framebuffer has stencil 4049 false, // Framebuffer has stencil
4033 0x1110, // color bits 4050 0x1110, // color bits
4034 false, // depth mask 4051 false, // depth mask
4035 false, // depth enabled 4052 false, // depth enabled
4036 0, // front stencil mask 4053 0, // front stencil mask
4037 0, // back stencil mask 4054 0, // back stencil mask
4038 false); // stencil enabled 4055 false, // stencil enabled
4056 false, // cull_face_enabled
4057 false); // scissor_test_enabled
4058
4039 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 4059 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
4040 .Times(1) 4060 .Times(1)
4041 .RetiresOnSaturation(); 4061 .RetiresOnSaturation();
4042 DrawArrays draw_cmd; 4062 DrawArrays draw_cmd;
4043 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); 4063 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices);
4044 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 4064 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
4045 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 4065 EXPECT_EQ(GL_NO_ERROR, GetGLError());
4046 4066
4047 EXPECT_CALL(*gl_, GetError()) 4067 EXPECT_CALL(*gl_, GetError())
4048 .WillOnce(Return(GL_NO_ERROR)) 4068 .WillOnce(Return(GL_NO_ERROR))
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
4085 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 4105 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
4086 SetupExpectationsForApplyingDirtyState( 4106 SetupExpectationsForApplyingDirtyState(
4087 true, // Framebuffer is RGB 4107 true, // Framebuffer is RGB
4088 false, // Framebuffer has depth 4108 false, // Framebuffer has depth
4089 true, // Framebuffer has stencil 4109 true, // Framebuffer has stencil
4090 0x1110, // color bits 4110 0x1110, // color bits
4091 false, // depth mask 4111 false, // depth mask
4092 false, // depth enabled 4112 false, // depth enabled
4093 -1, // front stencil mask 4113 -1, // front stencil mask
4094 -1, // back stencil mask 4114 -1, // back stencil mask
4095 true); // stencil enabled 4115 true, // stencil enabled
4116 false, // cull_face_enabled
4117 false); // scissor_test_enabled
4118
4096 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 4119 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
4097 .Times(1) 4120 .Times(1)
4098 .RetiresOnSaturation(); 4121 .RetiresOnSaturation();
4099 DrawArrays draw_cmd; 4122 DrawArrays draw_cmd;
4100 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); 4123 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices);
4101 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 4124 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
4102 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 4125 EXPECT_EQ(GL_NO_ERROR, GetGLError());
4103 4126
4104 EXPECT_CALL(*gl_, GetError()) 4127 EXPECT_CALL(*gl_, GetError())
4105 .WillOnce(Return(GL_NO_ERROR)) 4128 .WillOnce(Return(GL_NO_ERROR))
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
4142 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 4165 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
4143 SetupExpectationsForApplyingDirtyState( 4166 SetupExpectationsForApplyingDirtyState(
4144 true, // Framebuffer is RGB 4167 true, // Framebuffer is RGB
4145 false, // Framebuffer has depth 4168 false, // Framebuffer has depth
4146 false, // Framebuffer has stencil 4169 false, // Framebuffer has stencil
4147 0x1110, // color bits 4170 0x1110, // color bits
4148 false, // depth mask 4171 false, // depth mask
4149 false, // depth enabled 4172 false, // depth enabled
4150 0, // front stencil mask 4173 0, // front stencil mask
4151 0, // back stencil mask 4174 0, // back stencil mask
4152 false); // stencil enabled 4175 false, // stencil enabled
4176 false, // cull_face_enabled
4177 false); // scissor_test_enabled
4178
4153 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 4179 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
4154 .Times(1) 4180 .Times(1)
4155 .RetiresOnSaturation(); 4181 .RetiresOnSaturation();
4156 DrawArrays draw_cmd; 4182 DrawArrays draw_cmd;
4157 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); 4183 draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices);
4158 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); 4184 EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd));
4159 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 4185 EXPECT_EQ(GL_NO_ERROR, GetGLError());
4160 4186
4161 EXPECT_CALL(*gl_, GetError()) 4187 EXPECT_CALL(*gl_, GetError())
4162 .WillOnce(Return(GL_NO_ERROR)) 4188 .WillOnce(Return(GL_NO_ERROR))
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
5894 5920
5895 SetupExpectationsForApplyingDirtyState( 5921 SetupExpectationsForApplyingDirtyState(
5896 false, // Framebuffer is RGB 5922 false, // Framebuffer is RGB
5897 false, // Framebuffer has depth 5923 false, // Framebuffer has depth
5898 false, // Framebuffer has stencil 5924 false, // Framebuffer has stencil
5899 0x1111, // color bits 5925 0x1111, // color bits
5900 false, // depth mask 5926 false, // depth mask
5901 false, // depth enabled 5927 false, // depth enabled
5902 0, // front stencil mask 5928 0, // front stencil mask
5903 0, // back stencil mask 5929 0, // back stencil mask
5904 false); // stencil enabled 5930 false, // stencil enabled
5931 false, // cull_face_enabled
5932 false); // scissor_test_enabled
5933
5905 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 5934 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
5906 .Times(1) 5935 .Times(1)
5907 .RetiresOnSaturation(); 5936 .RetiresOnSaturation();
5908 DrawArrays cmd; 5937 DrawArrays cmd;
5909 cmd.Init(GL_TRIANGLES, 0, kNumVertices); 5938 cmd.Init(GL_TRIANGLES, 0, kNumVertices);
5910 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 5939 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
5911 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 5940 EXPECT_EQ(GL_NO_ERROR, GetGLError());
5912 5941
5913 // But not again. 5942 // But not again.
5914 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 5943 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
6056 false); // scissor test 6085 false); // scissor test
6057 SetupExpectationsForApplyingDirtyState( 6086 SetupExpectationsForApplyingDirtyState(
6058 false, // Framebuffer is RGB 6087 false, // Framebuffer is RGB
6059 false, // Framebuffer has depth 6088 false, // Framebuffer has depth
6060 false, // Framebuffer has stencil 6089 false, // Framebuffer has stencil
6061 0x1111, // color bits 6090 0x1111, // color bits
6062 false, // depth mask 6091 false, // depth mask
6063 false, // depth enabled 6092 false, // depth enabled
6064 0, // front stencil mask 6093 0, // front stencil mask
6065 0, // back stencil mask 6094 0, // back stencil mask
6066 false); // stencil enabled 6095 false, // stencil enabled
6096 false, // cull_face_enabled
6097 false); // scissor_test_enabled
6098
6067 EXPECT_CALL(*gl_, Clear(GL_COLOR_BUFFER_BIT)) 6099 EXPECT_CALL(*gl_, Clear(GL_COLOR_BUFFER_BIT))
6068 .Times(1) 6100 .Times(1)
6069 .RetiresOnSaturation(); 6101 .RetiresOnSaturation();
6070 6102
6071 Clear cmd; 6103 Clear cmd;
6072 cmd.Init(GL_COLOR_BUFFER_BIT); 6104 cmd.Init(GL_COLOR_BUFFER_BIT);
6073 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 6105 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
6074 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 6106 EXPECT_EQ(GL_NO_ERROR, GetGLError());
6075 } 6107 }
6076 6108
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
6209 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 6241 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
6210 SetupExpectationsForApplyingDirtyState( 6242 SetupExpectationsForApplyingDirtyState(
6211 false, // Framebuffer is RGB 6243 false, // Framebuffer is RGB
6212 false, // Framebuffer has depth 6244 false, // Framebuffer has depth
6213 false, // Framebuffer has stencil 6245 false, // Framebuffer has stencil
6214 0x1111, // color bits 6246 0x1111, // color bits
6215 false, // depth mask 6247 false, // depth mask
6216 false, // depth enabled 6248 false, // depth enabled
6217 0, // front stencil mask 6249 0, // front stencil mask
6218 0, // back stencil mask 6250 0, // back stencil mask
6219 false); // stencil enabled 6251 false, // stencil enabled
6252 false, // cull_face_enabled
6253 false); // scissor_test_enabled
6254
6220 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 6255 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
6221 .Times(1) 6256 .Times(1)
6222 .RetiresOnSaturation(); 6257 .RetiresOnSaturation();
6223 DrawArrays cmd; 6258 DrawArrays cmd;
6224 cmd.Init(GL_TRIANGLES, 0, kNumVertices); 6259 cmd.Init(GL_TRIANGLES, 0, kNumVertices);
6225 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 6260 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
6226 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 6261 EXPECT_EQ(GL_NO_ERROR, GetGLError());
6227 } 6262 }
6228 6263
6229 TEST_F(GLES2DecoderTest, DrawArraysClearsAfterTexImage2DNULLCubemap) { 6264 TEST_F(GLES2DecoderTest, DrawArraysClearsAfterTexImage2DNULLCubemap) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
6321 AddExpectationsForSimulatedAttrib0(kNumVertices, 0); 6356 AddExpectationsForSimulatedAttrib0(kNumVertices, 0);
6322 SetupExpectationsForApplyingDirtyState( 6357 SetupExpectationsForApplyingDirtyState(
6323 false, // Framebuffer is RGB 6358 false, // Framebuffer is RGB
6324 true, // Framebuffer has depth 6359 true, // Framebuffer has depth
6325 false, // Framebuffer has stencil 6360 false, // Framebuffer has stencil
6326 0x1111, // color bits 6361 0x1111, // color bits
6327 true, // depth mask 6362 true, // depth mask
6328 false, // depth enabled 6363 false, // depth enabled
6329 0, // front stencil mask 6364 0, // front stencil mask
6330 0, // back stencil mask 6365 0, // back stencil mask
6331 false); // stencil enabled 6366 false, // stencil enabled
6367 false, // cull_face_enabled
6368 false); // scissor_test_enabled
6369
6332 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 6370 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
6333 .Times(1) 6371 .Times(1)
6334 .RetiresOnSaturation(); 6372 .RetiresOnSaturation();
6335 DrawArrays cmd; 6373 DrawArrays cmd;
6336 cmd.Init(GL_TRIANGLES, 0, kNumVertices); 6374 cmd.Init(GL_TRIANGLES, 0, kNumVertices);
6337 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 6375 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
6338 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 6376 EXPECT_EQ(GL_NO_ERROR, GetGLError());
6339 } 6377 }
6340 6378
6341 TEST_F(GLES2DecoderWithShaderTest, CopyTexImageWithInCompleteFBOFails) { 6379 TEST_F(GLES2DecoderWithShaderTest, CopyTexImageWithInCompleteFBOFails) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
6538 6576
6539 SetupExpectationsForApplyingDirtyState( 6577 SetupExpectationsForApplyingDirtyState(
6540 false, // Framebuffer is RGB 6578 false, // Framebuffer is RGB
6541 false, // Framebuffer has depth 6579 false, // Framebuffer has depth
6542 false, // Framebuffer has stencil 6580 false, // Framebuffer has stencil
6543 0x1111, // color bits 6581 0x1111, // color bits
6544 false, // depth mask 6582 false, // depth mask
6545 false, // depth enabled 6583 false, // depth enabled
6546 0, // front stencil mask 6584 0, // front stencil mask
6547 0, // back stencil mask 6585 0, // back stencil mask
6548 false); // stencil enabled 6586 false, // stencil enabled
6587 false, // cull_face_enabled
6588 false); // scissor_test_enabled
6589
6549 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 6590 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
6550 .Times(1) 6591 .Times(1)
6551 .RetiresOnSaturation(); 6592 .RetiresOnSaturation();
6552 DrawArrays cmd; 6593 DrawArrays cmd;
6553 cmd.Init(GL_TRIANGLES, 0, kNumVertices); 6594 cmd.Init(GL_TRIANGLES, 0, kNumVertices);
6554 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 6595 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
6555 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 6596 EXPECT_EQ(GL_NO_ERROR, GetGLError());
6556 6597
6557 // But not again. 6598 // But not again.
6558 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) 6599 EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
6776 // TODO(gman): TexImage2DImmediate 6817 // TODO(gman): TexImage2DImmediate
6777 6818
6778 // TODO(gman): TexSubImage2DImmediate 6819 // TODO(gman): TexSubImage2DImmediate
6779 6820
6780 // TODO(gman): UseProgram 6821 // TODO(gman): UseProgram
6781 6822
6782 // TODO(gman): SwapBuffers 6823 // TODO(gman): SwapBuffers
6783 6824
6784 } // namespace gles2 6825 } // namespace gles2
6785 } // namespace gpu 6826 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698