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

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

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

Powered by Google App Engine
This is Rietveld 408576698