Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h

Issue 165393003: gpu: Generate mailboxes on client side (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // 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 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 struct Cmds { 1731 struct Cmds {
1732 cmds::VertexAttribDivisorANGLE cmd; 1732 cmds::VertexAttribDivisorANGLE cmd;
1733 }; 1733 };
1734 Cmds expected; 1734 Cmds expected;
1735 expected.cmd.Init(1, 2); 1735 expected.cmd.Init(1, 2);
1736 1736
1737 gl_->VertexAttribDivisorANGLE(1, 2); 1737 gl_->VertexAttribDivisorANGLE(1, 2);
1738 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1738 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1739 } 1739 }
1740 // TODO: Implement unit test for GenMailboxCHROMIUM 1740 // TODO: Implement unit test for GenMailboxCHROMIUM
1741
1742 TEST_F(GLES2ImplementationTest, ProduceTextureCHROMIUM) {
1743 GLbyte data[64] = {0};
1744 struct Cmds {
1745 cmds::ProduceTextureCHROMIUMImmediate cmd;
1746 GLbyte data[64];
1747 };
1748
1749 for (int jj = 0; jj < 64; ++jj) {
1750 data[jj] = static_cast<GLbyte>(jj);
1751 }
1752 Cmds expected;
1753 expected.cmd.Init(GL_TEXTURE_2D, &data[0]);
1754 gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, &data[0]);
1755 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1756 }
1757
1758 TEST_F(GLES2ImplementationTest, ConsumeTextureCHROMIUM) {
1759 GLbyte data[64] = {0};
1760 struct Cmds {
1761 cmds::ConsumeTextureCHROMIUMImmediate cmd;
1762 GLbyte data[64];
1763 };
1764
1765 for (int jj = 0; jj < 64; ++jj) {
1766 data[jj] = static_cast<GLbyte>(jj);
1767 }
1768 Cmds expected;
1769 expected.cmd.Init(GL_TEXTURE_2D, &data[0]);
1770 gl_->ConsumeTextureCHROMIUM(GL_TEXTURE_2D, &data[0]);
1771 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1772 }
1773 // TODO: Implement unit test for BindUniformLocationCHROMIUM 1741 // TODO: Implement unit test for BindUniformLocationCHROMIUM
1774 1742
1775 TEST_F(GLES2ImplementationTest, BindTexImage2DCHROMIUM) { 1743 TEST_F(GLES2ImplementationTest, BindTexImage2DCHROMIUM) {
1776 struct Cmds { 1744 struct Cmds {
1777 cmds::BindTexImage2DCHROMIUM cmd; 1745 cmds::BindTexImage2DCHROMIUM cmd;
1778 }; 1746 };
1779 Cmds expected; 1747 Cmds expected;
1780 expected.cmd.Init(GL_TEXTURE_2D, 2); 1748 expected.cmd.Init(GL_TEXTURE_2D, 2);
1781 1749
1782 gl_->BindTexImage2DCHROMIUM(GL_TEXTURE_2D, 2); 1750 gl_->BindTexImage2DCHROMIUM(GL_TEXTURE_2D, 2);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 cmds::DiscardBackbufferCHROMIUM cmd; 1826 cmds::DiscardBackbufferCHROMIUM cmd;
1859 }; 1827 };
1860 Cmds expected; 1828 Cmds expected;
1861 expected.cmd.Init(); 1829 expected.cmd.Init();
1862 1830
1863 gl_->DiscardBackbufferCHROMIUM(); 1831 gl_->DiscardBackbufferCHROMIUM();
1864 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1832 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1865 } 1833 }
1866 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 1834 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
1867 1835
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698