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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 .WillOnce(SetArgumentPointee<1>(kServiceVertexArrayId)) | 246 .WillOnce(SetArgumentPointee<1>(kServiceVertexArrayId)) |
247 .RetiresOnSaturation(); | 247 .RetiresOnSaturation(); |
248 EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation(); | 248 EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation(); |
249 } | 249 } |
250 | 250 |
251 if (group_->feature_info()->workarounds().init_vertex_attributes) | 251 if (group_->feature_info()->workarounds().init_vertex_attributes) |
252 AddExpectationsForVertexAttribManager(); | 252 AddExpectationsForVertexAttribManager(); |
253 | 253 |
254 AddExpectationsForBindVertexArrayOES(); | 254 AddExpectationsForBindVertexArrayOES(); |
255 | 255 |
256 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) | 256 if (!group_->feature_info()->gl_version_info().BehavesLikeGLES()) { |
257 .Times(1) | 257 EXPECT_CALL(*gl_, EnableVertexAttribArray(0)) |
258 .RetiresOnSaturation(); | 258 .Times(1) |
| 259 .RetiresOnSaturation(); |
| 260 } |
259 static GLuint attrib_0_id[] = { | 261 static GLuint attrib_0_id[] = { |
260 kServiceAttrib0BufferId, | 262 kServiceAttrib0BufferId, |
261 }; | 263 }; |
262 static GLuint fixed_attrib_buffer_id[] = { | 264 static GLuint fixed_attrib_buffer_id[] = { |
263 kServiceFixedAttribBufferId, | 265 kServiceFixedAttribBufferId, |
264 }; | 266 }; |
265 EXPECT_CALL(*gl_, GenBuffersARB(arraysize(attrib_0_id), _)) | 267 EXPECT_CALL(*gl_, GenBuffersARB(arraysize(attrib_0_id), _)) |
266 .WillOnce(SetArrayArgument<1>(attrib_0_id, | 268 .WillOnce(SetArrayArgument<1>(attrib_0_id, |
267 attrib_0_id + arraysize(attrib_0_id))) | 269 attrib_0_id + arraysize(attrib_0_id))) |
268 .RetiresOnSaturation(); | 270 .RetiresOnSaturation(); |
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1997 SetupDefaultProgram(); | 1999 SetupDefaultProgram(); |
1998 } | 2000 } |
1999 | 2001 |
2000 // Include the auto-generated part of this file. We split this because it means | 2002 // Include the auto-generated part of this file. We split this because it means |
2001 // we can easily edit the non-auto generated parts right here in this file | 2003 // we can easily edit the non-auto generated parts right here in this file |
2002 // instead of having to edit some template or the code generator. | 2004 // instead of having to edit some template or the code generator. |
2003 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2005 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
2004 | 2006 |
2005 } // namespace gles2 | 2007 } // namespace gles2 |
2006 } // namespace gpu | 2008 } // namespace gpu |
OLD | NEW |