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

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

Issue 754873002: Add a second unsafe ES3 API in command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 }; 202 };
203 Cmds expected; 203 Cmds expected;
204 expected.cmd.Init(1); 204 expected.cmd.Init(1);
205 205
206 gl_->CompileShader(1); 206 gl_->CompileShader(1);
207 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 207 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
208 } 208 }
209 // TODO: Implement unit test for CompressedTexImage2D 209 // TODO: Implement unit test for CompressedTexImage2D
210 // TODO: Implement unit test for CompressedTexSubImage2D 210 // TODO: Implement unit test for CompressedTexSubImage2D
211 211
212 TEST_F(GLES2ImplementationTest, CopyBufferSubData) {
213 struct Cmds {
214 cmds::CopyBufferSubData cmd;
215 };
216 Cmds expected;
217 expected.cmd.Init(GL_ARRAY_BUFFER, GL_ARRAY_BUFFER, 3, 4, 5);
218
219 gl_->CopyBufferSubData(GL_ARRAY_BUFFER, GL_ARRAY_BUFFER, 3, 4, 5);
220 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
221 }
222
212 TEST_F(GLES2ImplementationTest, CopyTexImage2D) { 223 TEST_F(GLES2ImplementationTest, CopyTexImage2D) {
213 struct Cmds { 224 struct Cmds {
214 cmds::CopyTexImage2D cmd; 225 cmds::CopyTexImage2D cmd;
215 }; 226 };
216 Cmds expected; 227 Cmds expected;
217 expected.cmd.Init(GL_TEXTURE_2D, 2, GL_ALPHA, 4, 5, 6, 7); 228 expected.cmd.Init(GL_TEXTURE_2D, 2, GL_ALPHA, 4, 5, 6, 7);
218 229
219 gl_->CopyTexImage2D(GL_TEXTURE_2D, 2, GL_ALPHA, 4, 5, 6, 7, 0); 230 gl_->CopyTexImage2D(GL_TEXTURE_2D, 2, GL_ALPHA, 4, 5, 6, 7, 0);
220 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 231 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
221 } 232 }
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 struct Cmds { 2037 struct Cmds {
2027 cmds::MatrixLoadIdentityCHROMIUM cmd; 2038 cmds::MatrixLoadIdentityCHROMIUM cmd;
2028 }; 2039 };
2029 Cmds expected; 2040 Cmds expected;
2030 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); 2041 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM);
2031 2042
2032 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); 2043 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM);
2033 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2044 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2034 } 2045 }
2035 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 2046 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_impl_autogen.h ('k') | gpu/command_buffer/client/gles2_interface_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698