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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 DisallowedFeatures())); | 236 DisallowedFeatures())); |
237 | 237 |
238 if (init.context_type == CONTEXT_TYPE_WEBGL2 || | 238 if (init.context_type == CONTEXT_TYPE_WEBGL2 || |
239 init.context_type == CONTEXT_TYPE_OPENGLES3) { | 239 init.context_type == CONTEXT_TYPE_OPENGLES3) { |
240 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) | 240 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) |
241 .WillOnce(SetArgumentPointee<1>(kMaxColorAttachments)) | 241 .WillOnce(SetArgumentPointee<1>(kMaxColorAttachments)) |
242 .RetiresOnSaturation(); | 242 .RetiresOnSaturation(); |
243 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) | 243 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) |
244 .WillOnce(SetArgumentPointee<1>(kMaxDrawBuffers)) | 244 .WillOnce(SetArgumentPointee<1>(kMaxDrawBuffers)) |
245 .RetiresOnSaturation(); | 245 .RetiresOnSaturation(); |
| 246 |
| 247 EXPECT_CALL(*gl_, GenTransformFeedbacks(1, _)) |
| 248 .WillOnce(SetArgumentPointee<1>(kServiceDefaultTransformFeedbackId)) |
| 249 .RetiresOnSaturation(); |
| 250 EXPECT_CALL(*gl_, BindTransformFeedback(GL_TRANSFORM_FEEDBACK, |
| 251 kServiceDefaultTransformFeedbackId)) |
| 252 .Times(1) |
| 253 .RetiresOnSaturation(); |
246 } | 254 } |
247 | 255 |
248 if (group_->feature_info()->feature_flags().native_vertex_array_object) { | 256 if (group_->feature_info()->feature_flags().native_vertex_array_object) { |
249 EXPECT_CALL(*gl_, GenVertexArraysOES(1, _)) | 257 EXPECT_CALL(*gl_, GenVertexArraysOES(1, _)) |
250 .WillOnce(SetArgumentPointee<1>(kServiceVertexArrayId)) | 258 .WillOnce(SetArgumentPointee<1>(kServiceVertexArrayId)) |
251 .RetiresOnSaturation(); | 259 .RetiresOnSaturation(); |
252 EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation(); | 260 EXPECT_CALL(*gl_, BindVertexArrayOES(_)).Times(1).RetiresOnSaturation(); |
253 } | 261 } |
254 | 262 |
255 if (group_->feature_info()->workarounds().init_vertex_attributes) | 263 if (group_->feature_info()->workarounds().init_vertex_attributes) |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 // All Tests should have read all their GLErrors before getting here. | 523 // All Tests should have read all their GLErrors before getting here. |
516 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 524 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
517 if (!decoder_->WasContextLost()) { | 525 if (!decoder_->WasContextLost()) { |
518 EXPECT_CALL(*gl_, DeleteBuffersARB(1, _)).Times(2).RetiresOnSaturation(); | 526 EXPECT_CALL(*gl_, DeleteBuffersARB(1, _)).Times(2).RetiresOnSaturation(); |
519 if (group_->feature_info()->feature_flags().native_vertex_array_object) { | 527 if (group_->feature_info()->feature_flags().native_vertex_array_object) { |
520 EXPECT_CALL(*gl_, | 528 EXPECT_CALL(*gl_, |
521 DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId))) | 529 DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId))) |
522 .Times(1) | 530 .Times(1) |
523 .RetiresOnSaturation(); | 531 .RetiresOnSaturation(); |
524 } | 532 } |
| 533 if (group_->feature_info()->IsES3Capable()) { |
| 534 EXPECT_CALL(*gl_, DeleteTransformFeedbacks(1, _)) |
| 535 .Times(1) |
| 536 .RetiresOnSaturation(); |
| 537 } |
525 } | 538 } |
526 | 539 |
527 decoder_->EndDecoding(); | 540 decoder_->EndDecoding(); |
528 decoder_->Destroy(!decoder_->WasContextLost()); | 541 decoder_->Destroy(!decoder_->WasContextLost()); |
529 decoder_.reset(); | 542 decoder_.reset(); |
530 group_->Destroy(mock_decoder_.get(), false); | 543 group_->Destroy(mock_decoder_.get(), false); |
531 engine_.reset(); | 544 engine_.reset(); |
532 ::gfx::MockGLInterface::SetGLInterface(NULL); | 545 ::gfx::MockGLInterface::SetGLInterface(NULL); |
533 gl_.reset(); | 546 gl_.reset(); |
534 gfx::ClearGLBindings(); | 547 gfx::ClearGLBindings(); |
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 const GLuint GLES2DecoderTestBase::kServiceFramebufferId; | 1486 const GLuint GLES2DecoderTestBase::kServiceFramebufferId; |
1474 const GLuint GLES2DecoderTestBase::kServiceRenderbufferId; | 1487 const GLuint GLES2DecoderTestBase::kServiceRenderbufferId; |
1475 const GLuint GLES2DecoderTestBase::kServiceSamplerId; | 1488 const GLuint GLES2DecoderTestBase::kServiceSamplerId; |
1476 const GLuint GLES2DecoderTestBase::kServiceTextureId; | 1489 const GLuint GLES2DecoderTestBase::kServiceTextureId; |
1477 const GLuint GLES2DecoderTestBase::kServiceProgramId; | 1490 const GLuint GLES2DecoderTestBase::kServiceProgramId; |
1478 const GLuint GLES2DecoderTestBase::kServiceShaderId; | 1491 const GLuint GLES2DecoderTestBase::kServiceShaderId; |
1479 const GLuint GLES2DecoderTestBase::kServiceElementBufferId; | 1492 const GLuint GLES2DecoderTestBase::kServiceElementBufferId; |
1480 const GLuint GLES2DecoderTestBase::kServiceQueryId; | 1493 const GLuint GLES2DecoderTestBase::kServiceQueryId; |
1481 const GLuint GLES2DecoderTestBase::kServiceVertexArrayId; | 1494 const GLuint GLES2DecoderTestBase::kServiceVertexArrayId; |
1482 const GLuint GLES2DecoderTestBase::kServiceTransformFeedbackId; | 1495 const GLuint GLES2DecoderTestBase::kServiceTransformFeedbackId; |
| 1496 const GLuint GLES2DecoderTestBase::kServiceDefaultTransformFeedbackId; |
1483 const GLuint GLES2DecoderTestBase::kServiceSyncId; | 1497 const GLuint GLES2DecoderTestBase::kServiceSyncId; |
1484 | 1498 |
1485 const int32_t GLES2DecoderTestBase::kSharedMemoryId; | 1499 const int32_t GLES2DecoderTestBase::kSharedMemoryId; |
1486 const size_t GLES2DecoderTestBase::kSharedBufferSize; | 1500 const size_t GLES2DecoderTestBase::kSharedBufferSize; |
1487 const uint32_t GLES2DecoderTestBase::kSharedMemoryOffset; | 1501 const uint32_t GLES2DecoderTestBase::kSharedMemoryOffset; |
1488 const int32_t GLES2DecoderTestBase::kInvalidSharedMemoryId; | 1502 const int32_t GLES2DecoderTestBase::kInvalidSharedMemoryId; |
1489 const uint32_t GLES2DecoderTestBase::kInvalidSharedMemoryOffset; | 1503 const uint32_t GLES2DecoderTestBase::kInvalidSharedMemoryOffset; |
1490 const uint32_t GLES2DecoderTestBase::kInitialResult; | 1504 const uint32_t GLES2DecoderTestBase::kInitialResult; |
1491 const uint8_t GLES2DecoderTestBase::kInitialMemoryValue; | 1505 const uint8_t GLES2DecoderTestBase::kInitialMemoryValue; |
1492 | 1506 |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 SetupDefaultProgram(); | 2046 SetupDefaultProgram(); |
2033 } | 2047 } |
2034 | 2048 |
2035 // Include the auto-generated part of this file. We split this because it means | 2049 // Include the auto-generated part of this file. We split this because it means |
2036 // we can easily edit the non-auto generated parts right here in this file | 2050 // we can easily edit the non-auto generated parts right here in this file |
2037 // instead of having to edit some template or the code generator. | 2051 // instead of having to edit some template or the code generator. |
2038 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2052 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
2039 | 2053 |
2040 } // namespace gles2 | 2054 } // namespace gles2 |
2041 } // namespace gpu | 2055 } // namespace gpu |
OLD | NEW |