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

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

Issue 2175043002: Add command buffer function glScheduleCALayerFilterEffectsCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix autogenerated tests. Created 4 years, 5 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
OLDNEW
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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 struct Cmds { 1131 struct Cmds {
1132 cmds::Hint cmd; 1132 cmds::Hint cmd;
1133 }; 1133 };
1134 Cmds expected; 1134 Cmds expected;
1135 expected.cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_FASTEST); 1135 expected.cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
1136 1136
1137 gl_->Hint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST); 1137 gl_->Hint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
1138 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1138 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1139 } 1139 }
1140 1140
1141 TEST_F(GLES2ImplementationTest, InvalidateFramebuffer) {
1142 GLenum data[2][1] = {{0}};
1143 struct Cmds {
1144 cmds::InvalidateFramebufferImmediate cmd;
1145 GLenum data[2][1];
1146 };
1147
1148 Cmds expected;
1149 for (int ii = 0; ii < 2; ++ii) {
1150 for (int jj = 0; jj < 1; ++jj) {
1151 data[ii][jj] = static_cast<GLenum>(ii * 1 + jj);
1152 }
1153 }
1154 expected.cmd.Init(GL_FRAMEBUFFER, 2, &data[0][0]);
1155 gl_->InvalidateFramebuffer(GL_FRAMEBUFFER, 2, &data[0][0]);
1156 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1157 }
1158
1159 TEST_F(GLES2ImplementationTest, InvalidateSubFramebuffer) {
1160 GLenum data[2][1] = {{0}};
1161 struct Cmds {
1162 cmds::InvalidateSubFramebufferImmediate cmd;
1163 GLenum data[2][1];
1164 };
1165
1166 Cmds expected;
1167 for (int ii = 0; ii < 2; ++ii) {
1168 for (int jj = 0; jj < 1; ++jj) {
1169 data[ii][jj] = static_cast<GLenum>(ii * 1 + jj);
1170 }
1171 }
1172 expected.cmd.Init(GL_FRAMEBUFFER, 2, &data[0][0], 4, 5, 6, 7);
1173 gl_->InvalidateSubFramebuffer(GL_FRAMEBUFFER, 2, &data[0][0], 4, 5, 6, 7);
1174 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1175 }
1176
1177 TEST_F(GLES2ImplementationTest, IsBuffer) { 1141 TEST_F(GLES2ImplementationTest, IsBuffer) {
1178 struct Cmds { 1142 struct Cmds {
1179 cmds::IsBuffer cmd; 1143 cmds::IsBuffer cmd;
1180 }; 1144 };
1181 1145
1182 Cmds expected; 1146 Cmds expected;
1183 ExpectedMemoryInfo result1 = 1147 ExpectedMemoryInfo result1 =
1184 GetExpectedResultMemory(sizeof(cmds::IsBuffer::Result)); 1148 GetExpectedResultMemory(sizeof(cmds::IsBuffer::Result));
1185 expected.cmd.Init(1, result1.id, result1.offset); 1149 expected.cmd.Init(1, result1.id, result1.offset);
1186 1150
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 struct Cmds { 2735 struct Cmds {
2772 cmds::ReleaseTexImage2DCHROMIUM cmd; 2736 cmds::ReleaseTexImage2DCHROMIUM cmd;
2773 }; 2737 };
2774 Cmds expected; 2738 Cmds expected;
2775 expected.cmd.Init(GL_TEXTURE_2D, 2); 2739 expected.cmd.Init(GL_TEXTURE_2D, 2);
2776 2740
2777 gl_->ReleaseTexImage2DCHROMIUM(GL_TEXTURE_2D, 2); 2741 gl_->ReleaseTexImage2DCHROMIUM(GL_TEXTURE_2D, 2);
2778 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2742 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2779 } 2743 }
2780 2744
2781 TEST_F(GLES2ImplementationTest, DiscardFramebufferEXT) {
2782 GLenum data[2][1] = {{0}};
2783 struct Cmds {
2784 cmds::DiscardFramebufferEXTImmediate cmd;
2785 GLenum data[2][1];
2786 };
2787
2788 Cmds expected;
2789 for (int ii = 0; ii < 2; ++ii) {
2790 for (int jj = 0; jj < 1; ++jj) {
2791 data[ii][jj] = static_cast<GLenum>(ii * 1 + jj);
2792 }
2793 }
2794 expected.cmd.Init(1, 2, &data[0][0]);
2795 gl_->DiscardFramebufferEXT(1, 2, &data[0][0]);
2796 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2797 }
2798
2799 TEST_F(GLES2ImplementationTest, LoseContextCHROMIUM) { 2745 TEST_F(GLES2ImplementationTest, LoseContextCHROMIUM) {
2800 struct Cmds { 2746 struct Cmds {
2801 cmds::LoseContextCHROMIUM cmd; 2747 cmds::LoseContextCHROMIUM cmd;
2802 }; 2748 };
2803 Cmds expected; 2749 Cmds expected;
2804 expected.cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_GUILTY_CONTEXT_RESET_ARB); 2750 expected.cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_GUILTY_CONTEXT_RESET_ARB);
2805 2751
2806 gl_->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, 2752 gl_->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
2807 GL_GUILTY_CONTEXT_RESET_ARB); 2753 GL_GUILTY_CONTEXT_RESET_ARB);
2808 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2754 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2809 } 2755 }
2810 2756
2811 TEST_F(GLES2ImplementationTest, DrawBuffersEXT) {
2812 GLenum data[1][1] = {{0}};
2813 struct Cmds {
2814 cmds::DrawBuffersEXTImmediate cmd;
2815 GLenum data[1][1];
2816 };
2817
2818 Cmds expected;
2819 for (int ii = 0; ii < 1; ++ii) {
2820 for (int jj = 0; jj < 1; ++jj) {
2821 data[ii][jj] = static_cast<GLenum>(ii * 1 + jj);
2822 }
2823 }
2824 expected.cmd.Init(1, &data[0][0]);
2825 gl_->DrawBuffersEXT(1, &data[0][0]);
2826 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2827 }
2828
2829 TEST_F(GLES2ImplementationTest, DiscardBackbufferCHROMIUM) { 2757 TEST_F(GLES2ImplementationTest, DiscardBackbufferCHROMIUM) {
2830 struct Cmds { 2758 struct Cmds {
2831 cmds::DiscardBackbufferCHROMIUM cmd; 2759 cmds::DiscardBackbufferCHROMIUM cmd;
2832 }; 2760 };
2833 Cmds expected; 2761 Cmds expected;
2834 expected.cmd.Init(); 2762 expected.cmd.Init();
2835 2763
2836 gl_->DiscardBackbufferCHROMIUM(); 2764 gl_->DiscardBackbufferCHROMIUM();
2837 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2765 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2838 } 2766 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
3027 struct Cmds { 2955 struct Cmds {
3028 cmds::CoverageModulationCHROMIUM cmd; 2956 cmds::CoverageModulationCHROMIUM cmd;
3029 }; 2957 };
3030 Cmds expected; 2958 Cmds expected;
3031 expected.cmd.Init(GL_RGB); 2959 expected.cmd.Init(GL_RGB);
3032 2960
3033 gl_->CoverageModulationCHROMIUM(GL_RGB); 2961 gl_->CoverageModulationCHROMIUM(GL_RGB);
3034 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2962 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3035 } 2963 }
3036 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 2964 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_autogen.h ('k') | gpu/command_buffer/client/gles2_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698