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 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
10 | 10 |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 TEST_F(GLES2ImplementationTest, DrawArrays) { | 549 TEST_F(GLES2ImplementationTest, DrawArrays) { |
550 struct Cmds { | 550 struct Cmds { |
551 cmds::DrawArrays cmd; | 551 cmds::DrawArrays cmd; |
552 }; | 552 }; |
553 Cmds expected; | 553 Cmds expected; |
554 expected.cmd.Init(GL_POINTS, 2, 3); | 554 expected.cmd.Init(GL_POINTS, 2, 3); |
555 | 555 |
556 gl_->DrawArrays(GL_POINTS, 2, 3); | 556 gl_->DrawArrays(GL_POINTS, 2, 3); |
557 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 557 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
558 } | 558 } |
| 559 // TODO(zmo): Implement unit test for DrawRangeElements |
559 | 560 |
560 TEST_F(GLES2ImplementationTest, EnableVertexAttribArray) { | 561 TEST_F(GLES2ImplementationTest, EnableVertexAttribArray) { |
561 struct Cmds { | 562 struct Cmds { |
562 cmds::EnableVertexAttribArray cmd; | 563 cmds::EnableVertexAttribArray cmd; |
563 }; | 564 }; |
564 Cmds expected; | 565 Cmds expected; |
565 expected.cmd.Init(1); | 566 expected.cmd.Init(1); |
566 | 567 |
567 gl_->EnableVertexAttribArray(1); | 568 gl_->EnableVertexAttribArray(1); |
568 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 569 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2711 | 2712 |
2712 EXPECT_CALL(*command_buffer(), OnFlush()) | 2713 EXPECT_CALL(*command_buffer(), OnFlush()) |
2713 .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE))) | 2714 .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE))) |
2714 .RetiresOnSaturation(); | 2715 .RetiresOnSaturation(); |
2715 | 2716 |
2716 GLboolean result = gl_->IsVertexArrayOES(1); | 2717 GLboolean result = gl_->IsVertexArrayOES(1); |
2717 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2718 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
2718 EXPECT_TRUE(result); | 2719 EXPECT_TRUE(result); |
2719 } | 2720 } |
2720 // TODO(zmo): Implement unit test for EnableFeatureCHROMIUM | 2721 // TODO(zmo): Implement unit test for EnableFeatureCHROMIUM |
| 2722 // TODO(zmo): Implement unit test for MapBufferRange |
| 2723 // TODO(zmo): Implement unit test for UnmapBuffer |
2721 | 2724 |
2722 TEST_F(GLES2ImplementationTest, ResizeCHROMIUM) { | 2725 TEST_F(GLES2ImplementationTest, ResizeCHROMIUM) { |
2723 struct Cmds { | 2726 struct Cmds { |
2724 cmds::ResizeCHROMIUM cmd; | 2727 cmds::ResizeCHROMIUM cmd; |
2725 }; | 2728 }; |
2726 Cmds expected; | 2729 Cmds expected; |
2727 expected.cmd.Init(1, 2, 3); | 2730 expected.cmd.Init(1, 2, 3); |
2728 | 2731 |
2729 gl_->ResizeCHROMIUM(1, 2, 3); | 2732 gl_->ResizeCHROMIUM(1, 2, 3); |
2730 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 2733 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3005 struct Cmds { | 3008 struct Cmds { |
3006 cmds::MatrixLoadIdentityCHROMIUM cmd; | 3009 cmds::MatrixLoadIdentityCHROMIUM cmd; |
3007 }; | 3010 }; |
3008 Cmds expected; | 3011 Cmds expected; |
3009 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); | 3012 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); |
3010 | 3013 |
3011 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); | 3014 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); |
3012 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 3015 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
3013 } | 3016 } |
3014 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 3017 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
OLD | NEW |