| 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 cmds::UseProgram cmd; | 824 cmds::UseProgram cmd; |
| 825 cmd.Init(client_program_id_); | 825 cmd.Init(client_program_id_); |
| 826 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 826 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 827 } | 827 } |
| 828 | 828 |
| 829 void GLES2DecoderTestBase::DoBindBuffer( | 829 void GLES2DecoderTestBase::DoBindBuffer( |
| 830 GLenum target, GLuint client_id, GLuint service_id) { | 830 GLenum target, GLuint client_id, GLuint service_id) { |
| 831 EXPECT_CALL(*gl_, BindBuffer(target, service_id)) | 831 EXPECT_CALL(*gl_, BindBuffer(target, service_id)) |
| 832 .Times(1) | 832 .Times(1) |
| 833 .RetiresOnSaturation(); | 833 .RetiresOnSaturation(); |
| 834 if (target == GL_PIXEL_PACK_BUFFER) { | |
| 835 EXPECT_CALL(*gl_, PixelStorei(GL_PACK_ROW_LENGTH, _)) | |
| 836 .Times(1) | |
| 837 .RetiresOnSaturation(); | |
| 838 EXPECT_CALL(*gl_, PixelStorei(GL_PACK_SKIP_PIXELS, _)) | |
| 839 .Times(1) | |
| 840 .RetiresOnSaturation(); | |
| 841 EXPECT_CALL(*gl_, PixelStorei(GL_PACK_SKIP_ROWS, _)) | |
| 842 .Times(1) | |
| 843 .RetiresOnSaturation(); | |
| 844 } | |
| 845 cmds::BindBuffer cmd; | 834 cmds::BindBuffer cmd; |
| 846 cmd.Init(target, client_id); | 835 cmd.Init(target, client_id); |
| 847 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 836 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 848 } | 837 } |
| 849 | 838 |
| 850 bool GLES2DecoderTestBase::DoIsBuffer(GLuint client_id) { | 839 bool GLES2DecoderTestBase::DoIsBuffer(GLuint client_id) { |
| 851 return IsObjectHelper<cmds::IsBuffer, cmds::IsBuffer::Result>(client_id); | 840 return IsObjectHelper<cmds::IsBuffer, cmds::IsBuffer::Result>(client_id); |
| 852 } | 841 } |
| 853 | 842 |
| 854 void GLES2DecoderTestBase::DoDeleteBuffer( | 843 void GLES2DecoderTestBase::DoDeleteBuffer( |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1949 SetupDefaultProgram(); | 1938 SetupDefaultProgram(); |
| 1950 } | 1939 } |
| 1951 | 1940 |
| 1952 // Include the auto-generated part of this file. We split this because it means | 1941 // Include the auto-generated part of this file. We split this because it means |
| 1953 // we can easily edit the non-auto generated parts right here in this file | 1942 // we can easily edit the non-auto generated parts right here in this file |
| 1954 // instead of having to edit some template or the code generator. | 1943 // instead of having to edit some template or the code generator. |
| 1955 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1944 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 1956 | 1945 |
| 1957 } // namespace gles2 | 1946 } // namespace gles2 |
| 1958 } // namespace gpu | 1947 } // namespace gpu |
| OLD | NEW |