| 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 cmds::UseProgram cmd; | 823 cmds::UseProgram cmd; |
| 824 cmd.Init(client_program_id_); | 824 cmd.Init(client_program_id_); |
| 825 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 825 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 826 } | 826 } |
| 827 | 827 |
| 828 void GLES2DecoderTestBase::DoBindBuffer( | 828 void GLES2DecoderTestBase::DoBindBuffer( |
| 829 GLenum target, GLuint client_id, GLuint service_id) { | 829 GLenum target, GLuint client_id, GLuint service_id) { |
| 830 EXPECT_CALL(*gl_, BindBuffer(target, service_id)) | 830 EXPECT_CALL(*gl_, BindBuffer(target, service_id)) |
| 831 .Times(1) | 831 .Times(1) |
| 832 .RetiresOnSaturation(); | 832 .RetiresOnSaturation(); |
| 833 if (target == GL_PIXEL_PACK_BUFFER) { |
| 834 EXPECT_CALL(*gl_, PixelStorei(GL_PACK_ROW_LENGTH, _)) |
| 835 .Times(1) |
| 836 .RetiresOnSaturation(); |
| 837 EXPECT_CALL(*gl_, PixelStorei(GL_PACK_SKIP_PIXELS, _)) |
| 838 .Times(1) |
| 839 .RetiresOnSaturation(); |
| 840 EXPECT_CALL(*gl_, PixelStorei(GL_PACK_SKIP_ROWS, _)) |
| 841 .Times(1) |
| 842 .RetiresOnSaturation(); |
| 843 } |
| 833 cmds::BindBuffer cmd; | 844 cmds::BindBuffer cmd; |
| 834 cmd.Init(target, client_id); | 845 cmd.Init(target, client_id); |
| 835 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 846 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 836 } | 847 } |
| 837 | 848 |
| 838 bool GLES2DecoderTestBase::DoIsBuffer(GLuint client_id) { | 849 bool GLES2DecoderTestBase::DoIsBuffer(GLuint client_id) { |
| 839 return IsObjectHelper<cmds::IsBuffer, cmds::IsBuffer::Result>(client_id); | 850 return IsObjectHelper<cmds::IsBuffer, cmds::IsBuffer::Result>(client_id); |
| 840 } | 851 } |
| 841 | 852 |
| 842 void GLES2DecoderTestBase::DoDeleteBuffer( | 853 void GLES2DecoderTestBase::DoDeleteBuffer( |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1906 SetupDefaultProgram(); | 1917 SetupDefaultProgram(); |
| 1907 } | 1918 } |
| 1908 | 1919 |
| 1909 // Include the auto-generated part of this file. We split this because it means | 1920 // Include the auto-generated part of this file. We split this because it means |
| 1910 // we can easily edit the non-auto generated parts right here in this file | 1921 // we can easily edit the non-auto generated parts right here in this file |
| 1911 // instead of having to edit some template or the code generator. | 1922 // instead of having to edit some template or the code generator. |
| 1912 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1923 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 1913 | 1924 |
| 1914 } // namespace gles2 | 1925 } // namespace gles2 |
| 1915 } // namespace gpu | 1926 } // namespace gpu |
| OLD | NEW |