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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 } | 1086 } |
1087 | 1087 |
1088 void GLES2DecoderTestBase::DoDeleteTexture( | 1088 void GLES2DecoderTestBase::DoDeleteTexture( |
1089 GLuint client_id, GLuint service_id) { | 1089 GLuint client_id, GLuint service_id) { |
1090 EXPECT_CALL(*gl_, DeleteTextures(1, Pointee(service_id))) | 1090 EXPECT_CALL(*gl_, DeleteTextures(1, Pointee(service_id))) |
1091 .Times(1) | 1091 .Times(1) |
1092 .RetiresOnSaturation(); | 1092 .RetiresOnSaturation(); |
1093 GenHelper<cmds::DeleteTexturesImmediate>(client_id); | 1093 GenHelper<cmds::DeleteTexturesImmediate>(client_id); |
1094 } | 1094 } |
1095 | 1095 |
| 1096 void GLES2DecoderTestBase::DoBindTexImage2DCHROMIUM(GLenum target, |
| 1097 GLint image_id) { |
| 1098 cmds::BindTexImage2DCHROMIUM bind_tex_image_2d_cmd; |
| 1099 bind_tex_image_2d_cmd.Init(target, image_id); |
| 1100 EXPECT_CALL(*gl_, GetError()) |
| 1101 .WillOnce(Return(GL_NO_ERROR)) |
| 1102 .WillOnce(Return(GL_NO_ERROR)) |
| 1103 .RetiresOnSaturation(); |
| 1104 EXPECT_EQ(error::kNoError, ExecuteCmd(bind_tex_image_2d_cmd)); |
| 1105 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 1106 } |
| 1107 |
1096 void GLES2DecoderTestBase::DoTexImage2D( | 1108 void GLES2DecoderTestBase::DoTexImage2D( |
1097 GLenum target, GLint level, GLenum internal_format, | 1109 GLenum target, GLint level, GLenum internal_format, |
1098 GLsizei width, GLsizei height, GLint border, | 1110 GLsizei width, GLsizei height, GLint border, |
1099 GLenum format, GLenum type, | 1111 GLenum format, GLenum type, |
1100 uint32 shared_memory_id, uint32 shared_memory_offset) { | 1112 uint32 shared_memory_id, uint32 shared_memory_offset) { |
1101 EXPECT_CALL(*gl_, GetError()) | 1113 EXPECT_CALL(*gl_, GetError()) |
1102 .WillOnce(Return(GL_NO_ERROR)) | 1114 .WillOnce(Return(GL_NO_ERROR)) |
1103 .RetiresOnSaturation(); | 1115 .RetiresOnSaturation(); |
1104 EXPECT_CALL(*gl_, TexImage2D(target, level, internal_format, | 1116 EXPECT_CALL(*gl_, TexImage2D(target, level, internal_format, |
1105 width, height, border, format, type, _)) | 1117 width, height, border, format, type, _)) |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1769 SetupDefaultProgram(); | 1781 SetupDefaultProgram(); |
1770 } | 1782 } |
1771 | 1783 |
1772 // Include the auto-generated part of this file. We split this because it means | 1784 // Include the auto-generated part of this file. We split this because it means |
1773 // we can easily edit the non-auto generated parts right here in this file | 1785 // we can easily edit the non-auto generated parts right here in this file |
1774 // instead of having to edit some template or the code generator. | 1786 // instead of having to edit some template or the code generator. |
1775 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1787 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1776 | 1788 |
1777 } // namespace gles2 | 1789 } // namespace gles2 |
1778 } // namespace gpu | 1790 } // namespace gpu |
OLD | NEW |