OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
10 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" | 10 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 init.bind_generates_resource = true; | 512 init.bind_generates_resource = true; |
513 init.extensions = "GL_KHR_blend_equation_advanced"; | 513 init.extensions = "GL_KHR_blend_equation_advanced"; |
514 InitDecoder(init); | 514 InitDecoder(init); |
515 } | 515 } |
516 }; | 516 }; |
517 | 517 |
518 INSTANTIATE_TEST_CASE_P(Service, | 518 INSTANTIATE_TEST_CASE_P(Service, |
519 GLES2DecoderTestWithBlendEquationAdvanced, | 519 GLES2DecoderTestWithBlendEquationAdvanced, |
520 ::testing::Bool()); | 520 ::testing::Bool()); |
521 | 521 |
| 522 class GLES2DecoderTestWithBlendFuncExtended : public GLES2DecoderTest { |
| 523 public: |
| 524 GLES2DecoderTestWithBlendFuncExtended() {} |
| 525 void SetUp() override { |
| 526 InitState init; |
| 527 init.gl_version = "opengl es 3.0"; |
| 528 init.has_alpha = true; |
| 529 init.has_depth = true; |
| 530 init.request_alpha = true; |
| 531 init.request_depth = true; |
| 532 init.bind_generates_resource = true; |
| 533 init.extensions = "GL_EXT_blend_func_extended"; |
| 534 InitDecoder(init); |
| 535 } |
| 536 }; |
| 537 |
| 538 class GLES2DecoderTestWithBlendFuncExtendedGLES20 : public GLES2DecoderTest { |
| 539 public: |
| 540 GLES2DecoderTestWithBlendFuncExtendedGLES20() {} |
| 541 void SetUp() override { |
| 542 InitState init; |
| 543 init.gl_version = "opengl es 2.0"; |
| 544 init.has_alpha = true; |
| 545 init.has_depth = true; |
| 546 init.request_alpha = true; |
| 547 init.request_depth = true; |
| 548 init.bind_generates_resource = true; |
| 549 init.extensions = "GL_EXT_blend_func_extended"; |
| 550 InitDecoder(init); |
| 551 } |
| 552 }; |
| 553 |
522 TEST_P(GLES2DecoderTestWithCHROMIUMPathRendering, GenDeletePaths) { | 554 TEST_P(GLES2DecoderTestWithCHROMIUMPathRendering, GenDeletePaths) { |
523 static GLuint kFirstClientID = client_path_id_ + 88; | 555 static GLuint kFirstClientID = client_path_id_ + 88; |
524 static GLsizei kPathCount = 58; | 556 static GLsizei kPathCount = 58; |
525 static GLuint kFirstCreatedServiceID = 8000; | 557 static GLuint kFirstCreatedServiceID = 8000; |
526 | 558 |
527 // GenPaths range 0 causes no calls. | 559 // GenPaths range 0 causes no calls. |
528 cmds::GenPathsCHROMIUM gen_cmd; | 560 cmds::GenPathsCHROMIUM gen_cmd; |
529 gen_cmd.Init(kFirstClientID, 0); | 561 gen_cmd.Init(kFirstClientID, 0); |
530 EXPECT_EQ(error::kNoError, ExecuteCmd(gen_cmd)); | 562 EXPECT_EQ(error::kNoError, ExecuteCmd(gen_cmd)); |
531 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 563 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1643 cmd.Init(client_program_id_, kLocation, kBucketId); | 1675 cmd.Init(client_program_id_, kLocation, kBucketId); |
1644 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 1676 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
1645 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); | 1677 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); |
1646 } | 1678 } |
1647 | 1679 |
1648 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions_autog
en.h" | 1680 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_extensions_autog
en.h" |
1649 | 1681 |
1650 } // namespace gles2 | 1682 } // namespace gles2 |
1651 } // namespace gpu | 1683 } // namespace gpu |
1652 | 1684 |
OLD | NEW |