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

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

Issue 247283005: Update GPU command buffer auto formatting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Remove mojo/ change. Created 6 years, 7 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 cmds::FrontFace cmd; 437 cmds::FrontFace cmd;
438 }; 438 };
439 Cmds expected; 439 Cmds expected;
440 expected.cmd.Init(GL_CW); 440 expected.cmd.Init(GL_CW);
441 441
442 gl_->FrontFace(GL_CW); 442 gl_->FrontFace(GL_CW);
443 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 443 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
444 } 444 }
445 445
446 TEST_F(GLES2ImplementationTest, GenBuffers) { 446 TEST_F(GLES2ImplementationTest, GenBuffers) {
447 GLuint ids[2] = {0, }; 447 GLuint ids[2] = {
448 0,
449 };
448 struct Cmds { 450 struct Cmds {
449 cmds::GenBuffersImmediate gen; 451 cmds::GenBuffersImmediate gen;
450 GLuint data[2]; 452 GLuint data[2];
451 }; 453 };
452 Cmds expected; 454 Cmds expected;
453 expected.gen.Init(arraysize(ids), &ids[0]); 455 expected.gen.Init(arraysize(ids), &ids[0]);
454 expected.data[0] = kBuffersStartId; 456 expected.data[0] = kBuffersStartId;
455 expected.data[1] = kBuffersStartId + 1; 457 expected.data[1] = kBuffersStartId + 1;
456 gl_->GenBuffers(arraysize(ids), &ids[0]); 458 gl_->GenBuffers(arraysize(ids), &ids[0]);
457 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 459 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
458 EXPECT_EQ(kBuffersStartId, ids[0]); 460 EXPECT_EQ(kBuffersStartId, ids[0]);
459 EXPECT_EQ(kBuffersStartId + 1, ids[1]); 461 EXPECT_EQ(kBuffersStartId + 1, ids[1]);
460 } 462 }
461 463
462 TEST_F(GLES2ImplementationTest, GenerateMipmap) { 464 TEST_F(GLES2ImplementationTest, GenerateMipmap) {
463 struct Cmds { 465 struct Cmds {
464 cmds::GenerateMipmap cmd; 466 cmds::GenerateMipmap cmd;
465 }; 467 };
466 Cmds expected; 468 Cmds expected;
467 expected.cmd.Init(GL_TEXTURE_2D); 469 expected.cmd.Init(GL_TEXTURE_2D);
468 470
469 gl_->GenerateMipmap(GL_TEXTURE_2D); 471 gl_->GenerateMipmap(GL_TEXTURE_2D);
470 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 472 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
471 } 473 }
472 474
473 TEST_F(GLES2ImplementationTest, GenFramebuffers) { 475 TEST_F(GLES2ImplementationTest, GenFramebuffers) {
474 GLuint ids[2] = {0, }; 476 GLuint ids[2] = {
477 0,
478 };
475 struct Cmds { 479 struct Cmds {
476 cmds::GenFramebuffersImmediate gen; 480 cmds::GenFramebuffersImmediate gen;
477 GLuint data[2]; 481 GLuint data[2];
478 }; 482 };
479 Cmds expected; 483 Cmds expected;
480 expected.gen.Init(arraysize(ids), &ids[0]); 484 expected.gen.Init(arraysize(ids), &ids[0]);
481 expected.data[0] = kFramebuffersStartId; 485 expected.data[0] = kFramebuffersStartId;
482 expected.data[1] = kFramebuffersStartId + 1; 486 expected.data[1] = kFramebuffersStartId + 1;
483 gl_->GenFramebuffers(arraysize(ids), &ids[0]); 487 gl_->GenFramebuffers(arraysize(ids), &ids[0]);
484 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 488 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
485 EXPECT_EQ(kFramebuffersStartId, ids[0]); 489 EXPECT_EQ(kFramebuffersStartId, ids[0]);
486 EXPECT_EQ(kFramebuffersStartId + 1, ids[1]); 490 EXPECT_EQ(kFramebuffersStartId + 1, ids[1]);
487 } 491 }
488 492
489 TEST_F(GLES2ImplementationTest, GenRenderbuffers) { 493 TEST_F(GLES2ImplementationTest, GenRenderbuffers) {
490 GLuint ids[2] = {0, }; 494 GLuint ids[2] = {
495 0,
496 };
491 struct Cmds { 497 struct Cmds {
492 cmds::GenRenderbuffersImmediate gen; 498 cmds::GenRenderbuffersImmediate gen;
493 GLuint data[2]; 499 GLuint data[2];
494 }; 500 };
495 Cmds expected; 501 Cmds expected;
496 expected.gen.Init(arraysize(ids), &ids[0]); 502 expected.gen.Init(arraysize(ids), &ids[0]);
497 expected.data[0] = kRenderbuffersStartId; 503 expected.data[0] = kRenderbuffersStartId;
498 expected.data[1] = kRenderbuffersStartId + 1; 504 expected.data[1] = kRenderbuffersStartId + 1;
499 gl_->GenRenderbuffers(arraysize(ids), &ids[0]); 505 gl_->GenRenderbuffers(arraysize(ids), &ids[0]);
500 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 506 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
501 EXPECT_EQ(kRenderbuffersStartId, ids[0]); 507 EXPECT_EQ(kRenderbuffersStartId, ids[0]);
502 EXPECT_EQ(kRenderbuffersStartId + 1, ids[1]); 508 EXPECT_EQ(kRenderbuffersStartId + 1, ids[1]);
503 } 509 }
504 510
505 TEST_F(GLES2ImplementationTest, GenTextures) { 511 TEST_F(GLES2ImplementationTest, GenTextures) {
506 GLuint ids[2] = {0, }; 512 GLuint ids[2] = {
513 0,
514 };
507 struct Cmds { 515 struct Cmds {
508 cmds::GenTexturesImmediate gen; 516 cmds::GenTexturesImmediate gen;
509 GLuint data[2]; 517 GLuint data[2];
510 }; 518 };
511 Cmds expected; 519 Cmds expected;
512 expected.gen.Init(arraysize(ids), &ids[0]); 520 expected.gen.Init(arraysize(ids), &ids[0]);
513 expected.data[0] = kTexturesStartId; 521 expected.data[0] = kTexturesStartId;
514 expected.data[1] = kTexturesStartId + 1; 522 expected.data[1] = kTexturesStartId + 1;
515 gl_->GenTextures(arraysize(ids), &ids[0]); 523 gl_->GenTextures(arraysize(ids), &ids[0]);
516 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 524 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 cmds::TexStorage2DEXT cmd; 1584 cmds::TexStorage2DEXT cmd;
1577 }; 1585 };
1578 Cmds expected; 1586 Cmds expected;
1579 expected.cmd.Init(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); 1587 expected.cmd.Init(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5);
1580 1588
1581 gl_->TexStorage2DEXT(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5); 1589 gl_->TexStorage2DEXT(GL_TEXTURE_2D, 2, GL_RGB565, 4, 5);
1582 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1590 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1583 } 1591 }
1584 1592
1585 TEST_F(GLES2ImplementationTest, GenQueriesEXT) { 1593 TEST_F(GLES2ImplementationTest, GenQueriesEXT) {
1586 GLuint ids[2] = {0, }; 1594 GLuint ids[2] = {
1595 0,
1596 };
1587 struct Cmds { 1597 struct Cmds {
1588 cmds::GenQueriesEXTImmediate gen; 1598 cmds::GenQueriesEXTImmediate gen;
1589 GLuint data[2]; 1599 GLuint data[2];
1590 }; 1600 };
1591 Cmds expected; 1601 Cmds expected;
1592 expected.gen.Init(arraysize(ids), &ids[0]); 1602 expected.gen.Init(arraysize(ids), &ids[0]);
1593 expected.data[0] = kQueriesStartId; 1603 expected.data[0] = kQueriesStartId;
1594 expected.data[1] = kQueriesStartId + 1; 1604 expected.data[1] = kQueriesStartId + 1;
1595 gl_->GenQueriesEXT(arraysize(ids), &ids[0]); 1605 gl_->GenQueriesEXT(arraysize(ids), &ids[0]);
1596 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1606 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
(...skipping 23 matching lines...) Expand all
1620 cmds::PopGroupMarkerEXT cmd; 1630 cmds::PopGroupMarkerEXT cmd;
1621 }; 1631 };
1622 Cmds expected; 1632 Cmds expected;
1623 expected.cmd.Init(); 1633 expected.cmd.Init();
1624 1634
1625 gl_->PopGroupMarkerEXT(); 1635 gl_->PopGroupMarkerEXT();
1626 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1636 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1627 } 1637 }
1628 1638
1629 TEST_F(GLES2ImplementationTest, GenVertexArraysOES) { 1639 TEST_F(GLES2ImplementationTest, GenVertexArraysOES) {
1630 GLuint ids[2] = {0, }; 1640 GLuint ids[2] = {
1641 0,
1642 };
1631 struct Cmds { 1643 struct Cmds {
1632 cmds::GenVertexArraysOESImmediate gen; 1644 cmds::GenVertexArraysOESImmediate gen;
1633 GLuint data[2]; 1645 GLuint data[2];
1634 }; 1646 };
1635 Cmds expected; 1647 Cmds expected;
1636 expected.gen.Init(arraysize(ids), &ids[0]); 1648 expected.gen.Init(arraysize(ids), &ids[0]);
1637 expected.data[0] = kVertexArraysStartId; 1649 expected.data[0] = kVertexArraysStartId;
1638 expected.data[1] = kVertexArraysStartId + 1; 1650 expected.data[1] = kVertexArraysStartId + 1;
1639 gl_->GenVertexArraysOES(arraysize(ids), &ids[0]); 1651 gl_->GenVertexArraysOES(arraysize(ids), &ids[0]);
1640 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1652 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 struct Cmds { 1836 struct Cmds {
1825 cmds::DiscardBackbufferCHROMIUM cmd; 1837 cmds::DiscardBackbufferCHROMIUM cmd;
1826 }; 1838 };
1827 Cmds expected; 1839 Cmds expected;
1828 expected.cmd.Init(); 1840 expected.cmd.Init();
1829 1841
1830 gl_->DiscardBackbufferCHROMIUM(); 1842 gl_->DiscardBackbufferCHROMIUM();
1831 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 1843 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
1832 } 1844 }
1833 #endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_ 1845 #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_stub_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698