| 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 // 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 // DO NOT EDIT! | 7 // DO NOT EDIT! |
| 8 | 8 |
| 9 // This file is included by gles2_implementation.h to declare the | 9 // This file is included by gles2_implementation.h to declare the |
| 10 // GL api functions. | 10 // GL api functions. |
| (...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 DestroyStreamTextureCHROMIUM cmd; | 1616 DestroyStreamTextureCHROMIUM cmd; |
| 1617 }; | 1617 }; |
| 1618 Cmds expected; | 1618 Cmds expected; |
| 1619 expected.cmd.Init(1); | 1619 expected.cmd.Init(1); |
| 1620 | 1620 |
| 1621 gl_->DestroyStreamTextureCHROMIUM(1); | 1621 gl_->DestroyStreamTextureCHROMIUM(1); |
| 1622 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 1622 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 1623 } | 1623 } |
| 1624 // TODO: Implement unit test for GetTranslatedShaderSourceANGLE | 1624 // TODO: Implement unit test for GetTranslatedShaderSourceANGLE |
| 1625 | 1625 |
| 1626 TEST_F(GLES2ImplementationTest, ProduceTextureCHROMIUM) { |
| 1627 struct Cmds { |
| 1628 ProduceTextureCHROMIUMImmediate cmd; |
| 1629 GLint data[32]; |
| 1630 }; |
| 1631 |
| 1632 Cmds expected; |
| 1633 for (int jj = 0; jj < 32; ++jj) { |
| 1634 expected.data[jj] = static_cast<GLint>(jj); |
| 1635 } |
| 1636 expected.cmd.Init(GL_TEXTURE_2D, &expected.data[0]); |
| 1637 gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, &expected.data[0]); |
| 1638 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 1639 } |
| 1640 |
| 1641 TEST_F(GLES2ImplementationTest, ConsumeTextureCHROMIUM) { |
| 1642 struct Cmds { |
| 1643 ConsumeTextureCHROMIUMImmediate cmd; |
| 1644 GLint data[32]; |
| 1645 }; |
| 1646 |
| 1647 Cmds expected; |
| 1648 for (int jj = 0; jj < 32; ++jj) { |
| 1649 expected.data[jj] = static_cast<GLint>(jj); |
| 1650 } |
| 1651 expected.cmd.Init(GL_TEXTURE_2D, &expected.data[0]); |
| 1652 gl_->ConsumeTextureCHROMIUM(GL_TEXTURE_2D, &expected.data[0]); |
| 1653 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 1654 } |
| 1655 |
| 1626 TEST_F(GLES2ImplementationTest, TexImageIOSurface2DCHROMIUM) { | 1656 TEST_F(GLES2ImplementationTest, TexImageIOSurface2DCHROMIUM) { |
| 1627 struct Cmds { | 1657 struct Cmds { |
| 1628 TexImageIOSurface2DCHROMIUM cmd; | 1658 TexImageIOSurface2DCHROMIUM cmd; |
| 1629 }; | 1659 }; |
| 1630 Cmds expected; | 1660 Cmds expected; |
| 1631 expected.cmd.Init(GL_TEXTURE_2D, 2, 3, 4, 5); | 1661 expected.cmd.Init(GL_TEXTURE_2D, 2, 3, 4, 5); |
| 1632 | 1662 |
| 1633 gl_->TexImageIOSurface2DCHROMIUM(GL_TEXTURE_2D, 2, 3, 4, 5); | 1663 gl_->TexImageIOSurface2DCHROMIUM(GL_TEXTURE_2D, 2, 3, 4, 5); |
| 1634 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 1664 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 1635 } | 1665 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1650 VertexAttribDivisorANGLE cmd; | 1680 VertexAttribDivisorANGLE cmd; |
| 1651 }; | 1681 }; |
| 1652 Cmds expected; | 1682 Cmds expected; |
| 1653 expected.cmd.Init(1, 2); | 1683 expected.cmd.Init(1, 2); |
| 1654 | 1684 |
| 1655 gl_->VertexAttribDivisorANGLE(1, 2); | 1685 gl_->VertexAttribDivisorANGLE(1, 2); |
| 1656 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 1686 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 1657 } | 1687 } |
| 1658 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ | 1688 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ |
| 1659 | 1689 |
| OLD | NEW |