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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 DoBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, 2, indices); | 2047 DoBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, 2, indices); |
2048 DoBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 2, sizeof(indices) - 2, &indices[1]); | 2048 DoBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 2, sizeof(indices) - 2, &indices[1]); |
2049 } | 2049 } |
2050 | 2050 |
2051 void GLES2DecoderTestBase::SetupTexture() { | 2051 void GLES2DecoderTestBase::SetupTexture() { |
2052 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); | 2052 DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); |
2053 DoTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, | 2053 DoTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, |
2054 kSharedMemoryId, kSharedMemoryOffset); | 2054 kSharedMemoryId, kSharedMemoryOffset); |
2055 }; | 2055 }; |
2056 | 2056 |
| 2057 void GLES2DecoderTestBase::SetupSampler() { |
| 2058 DoBindSampler(0, client_sampler_id_, kServiceSamplerId); |
| 2059 }; |
| 2060 |
2057 void GLES2DecoderTestBase::DeleteVertexBuffer() { | 2061 void GLES2DecoderTestBase::DeleteVertexBuffer() { |
2058 DoDeleteBuffer(client_buffer_id_, kServiceBufferId); | 2062 DoDeleteBuffer(client_buffer_id_, kServiceBufferId); |
2059 } | 2063 } |
2060 | 2064 |
2061 void GLES2DecoderTestBase::DeleteIndexBuffer() { | 2065 void GLES2DecoderTestBase::DeleteIndexBuffer() { |
2062 DoDeleteBuffer(client_element_buffer_id_, kServiceElementBufferId); | 2066 DoDeleteBuffer(client_element_buffer_id_, kServiceElementBufferId); |
2063 } | 2067 } |
2064 | 2068 |
2065 void GLES2DecoderTestBase::AddExpectationsForSimulatedAttrib0WithError( | 2069 void GLES2DecoderTestBase::AddExpectationsForSimulatedAttrib0WithError( |
2066 GLsizei num_vertices, GLuint buffer_id, GLenum error) { | 2070 GLsizei num_vertices, GLuint buffer_id, GLenum error) { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2183 SetupDefaultProgram(); | 2187 SetupDefaultProgram(); |
2184 } | 2188 } |
2185 | 2189 |
2186 // Include the auto-generated part of this file. We split this because it means | 2190 // Include the auto-generated part of this file. We split this because it means |
2187 // we can easily edit the non-auto generated parts right here in this file | 2191 // we can easily edit the non-auto generated parts right here in this file |
2188 // instead of having to edit some template or the code generator. | 2192 // instead of having to edit some template or the code generator. |
2189 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2193 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
2190 | 2194 |
2191 } // namespace gles2 | 2195 } // namespace gles2 |
2192 } // namespace gpu | 2196 } // namespace gpu |
OLD | NEW |