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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 struct Cmds { 189 struct Cmds {
190 cmds::Clear cmd; 190 cmds::Clear cmd;
191 }; 191 };
192 Cmds expected; 192 Cmds expected;
193 expected.cmd.Init(1); 193 expected.cmd.Init(1);
194 194
195 gl_->Clear(1); 195 gl_->Clear(1);
196 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 196 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
197 } 197 }
198 198
199 TEST_F(GLES2ImplementationTest, ClearBufferfi) {
200 struct Cmds {
201 cmds::ClearBufferfi cmd;
202 };
203 Cmds expected;
204 expected.cmd.Init(GL_COLOR, 2, 3, 4);
205
206 gl_->ClearBufferfi(GL_COLOR, 2, 3, 4);
207 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
208 }
209
210 TEST_F(GLES2ImplementationTest, ClearBufferfv) {
211 GLfloat data[4] = {0};
212 struct Cmds {
213 cmds::ClearBufferfvImmediate cmd;
214 GLfloat data[4];
215 };
216
217 for (int jj = 0; jj < 4; ++jj) {
218 data[jj] = static_cast<GLfloat>(jj);
219 }
220 Cmds expected;
221 expected.cmd.Init(GL_COLOR, 2, &data[0]);
222 gl_->ClearBufferfv(GL_COLOR, 2, &data[0]);
223 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
224 }
225
226 TEST_F(GLES2ImplementationTest, ClearBufferiv) {
227 GLint data[4] = {0};
228 struct Cmds {
229 cmds::ClearBufferivImmediate cmd;
230 GLint data[4];
231 };
232
233 for (int jj = 0; jj < 4; ++jj) {
234 data[jj] = static_cast<GLint>(jj);
235 }
236 Cmds expected;
237 expected.cmd.Init(GL_COLOR, 2, &data[0]);
238 gl_->ClearBufferiv(GL_COLOR, 2, &data[0]);
239 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
240 }
241
242 TEST_F(GLES2ImplementationTest, ClearBufferuiv) {
243 GLuint data[4] = {0};
244 struct Cmds {
245 cmds::ClearBufferuivImmediate cmd;
246 GLuint data[4];
247 };
248
249 for (int jj = 0; jj < 4; ++jj) {
250 data[jj] = static_cast<GLuint>(jj);
251 }
252 Cmds expected;
253 expected.cmd.Init(GL_COLOR, 2, &data[0]);
254 gl_->ClearBufferuiv(GL_COLOR, 2, &data[0]);
255 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
256 }
257
199 TEST_F(GLES2ImplementationTest, ClearColor) { 258 TEST_F(GLES2ImplementationTest, ClearColor) {
200 struct Cmds { 259 struct Cmds {
201 cmds::ClearColor cmd; 260 cmds::ClearColor cmd;
202 }; 261 };
203 Cmds expected; 262 Cmds expected;
204 expected.cmd.Init(1, 2, 3, 4); 263 expected.cmd.Init(1, 2, 3, 4);
205 264
206 gl_->ClearColor(1, 2, 3, 4); 265 gl_->ClearColor(1, 2, 3, 4);
207 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 266 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
208 } 267 }
(...skipping 2532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 struct Cmds { 2800 struct Cmds {
2742 cmds::MatrixLoadIdentityCHROMIUM cmd; 2801 cmds::MatrixLoadIdentityCHROMIUM cmd;
2743 }; 2802 };
2744 Cmds expected; 2803 Cmds expected;
2745 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM); 2804 expected.cmd.Init(GL_PATH_PROJECTION_CHROMIUM);
2746 2805
2747 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM); 2806 gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM);
2748 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 2807 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
2749 } 2808 }
2750 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 2809 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698