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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 client_renderbuffer_id_(103), | 92 client_renderbuffer_id_(103), |
93 client_sampler_id_(104), | 93 client_sampler_id_(104), |
94 client_shader_id_(105), | 94 client_shader_id_(105), |
95 client_texture_id_(106), | 95 client_texture_id_(106), |
96 client_element_buffer_id_(107), | 96 client_element_buffer_id_(107), |
97 client_vertex_shader_id_(121), | 97 client_vertex_shader_id_(121), |
98 client_fragment_shader_id_(122), | 98 client_fragment_shader_id_(122), |
99 client_query_id_(123), | 99 client_query_id_(123), |
100 client_vertexarray_id_(124), | 100 client_vertexarray_id_(124), |
101 client_valuebuffer_id_(125), | 101 client_valuebuffer_id_(125), |
| 102 client_transformfeedback_id_(126), |
102 service_renderbuffer_id_(0), | 103 service_renderbuffer_id_(0), |
103 service_renderbuffer_valid_(false), | 104 service_renderbuffer_valid_(false), |
104 ignore_cached_state_for_test_(GetParam()), | 105 ignore_cached_state_for_test_(GetParam()), |
105 cached_color_mask_red_(true), | 106 cached_color_mask_red_(true), |
106 cached_color_mask_green_(true), | 107 cached_color_mask_green_(true), |
107 cached_color_mask_blue_(true), | 108 cached_color_mask_blue_(true), |
108 cached_color_mask_alpha_(true), | 109 cached_color_mask_alpha_(true), |
109 cached_depth_mask_(true), | 110 cached_depth_mask_(true), |
110 cached_stencil_front_mask_(static_cast<GLuint>(-1)), | 111 cached_stencil_front_mask_(static_cast<GLuint>(-1)), |
111 cached_stencil_back_mask_(static_cast<GLuint>(-1)) { | 112 cached_stencil_back_mask_(static_cast<GLuint>(-1)) { |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 // Unsafe commands. | 418 // Unsafe commands. |
418 bool reset_unsafe_es3_apis_enabled = false; | 419 bool reset_unsafe_es3_apis_enabled = false; |
419 if (!decoder_->unsafe_es3_apis_enabled()) { | 420 if (!decoder_->unsafe_es3_apis_enabled()) { |
420 decoder_->set_unsafe_es3_apis_enabled(true); | 421 decoder_->set_unsafe_es3_apis_enabled(true); |
421 reset_unsafe_es3_apis_enabled = true; | 422 reset_unsafe_es3_apis_enabled = true; |
422 } | 423 } |
423 EXPECT_CALL(*gl_, GenSamplers(_, _)) | 424 EXPECT_CALL(*gl_, GenSamplers(_, _)) |
424 .WillOnce(SetArgumentPointee<1>(kServiceSamplerId)) | 425 .WillOnce(SetArgumentPointee<1>(kServiceSamplerId)) |
425 .RetiresOnSaturation(); | 426 .RetiresOnSaturation(); |
426 GenHelper<cmds::GenSamplersImmediate>(client_sampler_id_); | 427 GenHelper<cmds::GenSamplersImmediate>(client_sampler_id_); |
| 428 EXPECT_CALL(*gl_, GenTransformFeedbacks(_, _)) |
| 429 .WillOnce(SetArgumentPointee<1>(kServiceTransformFeedbackId)) |
| 430 .RetiresOnSaturation(); |
| 431 GenHelper<cmds::GenTransformFeedbacksImmediate>(client_transformfeedback_id_); |
427 if (reset_unsafe_es3_apis_enabled) { | 432 if (reset_unsafe_es3_apis_enabled) { |
428 decoder_->set_unsafe_es3_apis_enabled(false); | 433 decoder_->set_unsafe_es3_apis_enabled(false); |
429 } | 434 } |
430 | 435 |
431 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 436 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
432 } | 437 } |
433 | 438 |
434 void GLES2DecoderTestBase::ResetDecoder() { | 439 void GLES2DecoderTestBase::ResetDecoder() { |
435 if (!decoder_.get()) | 440 if (!decoder_.get()) |
436 return; | 441 return; |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 const GLuint GLES2DecoderTestBase::kServiceBufferId; | 1265 const GLuint GLES2DecoderTestBase::kServiceBufferId; |
1261 const GLuint GLES2DecoderTestBase::kServiceFramebufferId; | 1266 const GLuint GLES2DecoderTestBase::kServiceFramebufferId; |
1262 const GLuint GLES2DecoderTestBase::kServiceRenderbufferId; | 1267 const GLuint GLES2DecoderTestBase::kServiceRenderbufferId; |
1263 const GLuint GLES2DecoderTestBase::kServiceSamplerId; | 1268 const GLuint GLES2DecoderTestBase::kServiceSamplerId; |
1264 const GLuint GLES2DecoderTestBase::kServiceTextureId; | 1269 const GLuint GLES2DecoderTestBase::kServiceTextureId; |
1265 const GLuint GLES2DecoderTestBase::kServiceProgramId; | 1270 const GLuint GLES2DecoderTestBase::kServiceProgramId; |
1266 const GLuint GLES2DecoderTestBase::kServiceShaderId; | 1271 const GLuint GLES2DecoderTestBase::kServiceShaderId; |
1267 const GLuint GLES2DecoderTestBase::kServiceElementBufferId; | 1272 const GLuint GLES2DecoderTestBase::kServiceElementBufferId; |
1268 const GLuint GLES2DecoderTestBase::kServiceQueryId; | 1273 const GLuint GLES2DecoderTestBase::kServiceQueryId; |
1269 const GLuint GLES2DecoderTestBase::kServiceVertexArrayId; | 1274 const GLuint GLES2DecoderTestBase::kServiceVertexArrayId; |
| 1275 const GLuint GLES2DecoderTestBase::kServiceTransformFeedbackId; |
1270 | 1276 |
1271 const int32 GLES2DecoderTestBase::kSharedMemoryId; | 1277 const int32 GLES2DecoderTestBase::kSharedMemoryId; |
1272 const size_t GLES2DecoderTestBase::kSharedBufferSize; | 1278 const size_t GLES2DecoderTestBase::kSharedBufferSize; |
1273 const uint32 GLES2DecoderTestBase::kSharedMemoryOffset; | 1279 const uint32 GLES2DecoderTestBase::kSharedMemoryOffset; |
1274 const int32 GLES2DecoderTestBase::kInvalidSharedMemoryId; | 1280 const int32 GLES2DecoderTestBase::kInvalidSharedMemoryId; |
1275 const uint32 GLES2DecoderTestBase::kInvalidSharedMemoryOffset; | 1281 const uint32 GLES2DecoderTestBase::kInvalidSharedMemoryOffset; |
1276 const uint32 GLES2DecoderTestBase::kInitialResult; | 1282 const uint32 GLES2DecoderTestBase::kInitialResult; |
1277 const uint8 GLES2DecoderTestBase::kInitialMemoryValue; | 1283 const uint8 GLES2DecoderTestBase::kInitialMemoryValue; |
1278 | 1284 |
1279 const uint32 GLES2DecoderTestBase::kNewClientId; | 1285 const uint32 GLES2DecoderTestBase::kNewClientId; |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1688 SetupDefaultProgram(); | 1694 SetupDefaultProgram(); |
1689 } | 1695 } |
1690 | 1696 |
1691 // Include the auto-generated part of this file. We split this because it means | 1697 // Include the auto-generated part of this file. We split this because it means |
1692 // we can easily edit the non-auto generated parts right here in this file | 1698 // we can easily edit the non-auto generated parts right here in this file |
1693 // instead of having to edit some template or the code generator. | 1699 // instead of having to edit some template or the code generator. |
1694 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1700 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1695 | 1701 |
1696 } // namespace gles2 | 1702 } // namespace gles2 |
1697 } // namespace gpu | 1703 } // namespace gpu |
OLD | NEW |