OLD | NEW |
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 4688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4699 EXPECT_EQ(static_cast<GLboolean>(12), cmd.is_clipped); | 4699 EXPECT_EQ(static_cast<GLboolean>(12), cmd.is_clipped); |
4700 EXPECT_EQ(static_cast<GLint>(13), cmd.z_order); | 4700 EXPECT_EQ(static_cast<GLint>(13), cmd.z_order); |
4701 EXPECT_EQ(static_cast<GLuint>(14), cmd.shm_id); | 4701 EXPECT_EQ(static_cast<GLuint>(14), cmd.shm_id); |
4702 EXPECT_EQ(static_cast<GLuint>(15), cmd.shm_offset); | 4702 EXPECT_EQ(static_cast<GLuint>(15), cmd.shm_offset); |
4703 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); | 4703 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
4704 } | 4704 } |
4705 | 4705 |
4706 TEST_F(GLES2FormatTest, ScheduleDCLayerCHROMIUM) { | 4706 TEST_F(GLES2FormatTest, ScheduleDCLayerCHROMIUM) { |
4707 cmds::ScheduleDCLayerCHROMIUM& cmd = | 4707 cmds::ScheduleDCLayerCHROMIUM& cmd = |
4708 *GetBufferAs<cmds::ScheduleDCLayerCHROMIUM>(); | 4708 *GetBufferAs<cmds::ScheduleDCLayerCHROMIUM>(); |
4709 void* next_cmd = | 4709 void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(11), |
4710 cmd.Set(&cmd, static_cast<GLsizei>(11), static_cast<GLuint>(12), | 4710 static_cast<GLuint>(12), static_cast<GLuint>(13), |
4711 static_cast<GLuint>(13), static_cast<GLuint>(14), | 4711 static_cast<GLuint>(14), static_cast<GLsizei>(15), |
4712 static_cast<GLuint>(15), static_cast<GLuint>(16)); | 4712 static_cast<GLuint>(16), static_cast<GLuint>(17)); |
4713 EXPECT_EQ(static_cast<uint32_t>(cmds::ScheduleDCLayerCHROMIUM::kCmdId), | 4713 EXPECT_EQ(static_cast<uint32_t>(cmds::ScheduleDCLayerCHROMIUM::kCmdId), |
4714 cmd.header.command); | 4714 cmd.header.command); |
4715 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 4715 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
4716 EXPECT_EQ(static_cast<GLsizei>(11), cmd.num_textures); | 4716 EXPECT_EQ(static_cast<GLsizei>(11), cmd.num_textures); |
4717 EXPECT_EQ(static_cast<GLuint>(12), cmd.background_color); | 4717 EXPECT_EQ(static_cast<GLuint>(12), cmd.background_color); |
4718 EXPECT_EQ(static_cast<GLuint>(13), cmd.edge_aa_mask); | 4718 EXPECT_EQ(static_cast<GLuint>(13), cmd.edge_aa_mask); |
4719 EXPECT_EQ(static_cast<GLuint>(14), cmd.filter); | 4719 EXPECT_EQ(static_cast<GLuint>(14), cmd.filter); |
4720 EXPECT_EQ(static_cast<GLuint>(15), cmd.shm_id); | 4720 EXPECT_EQ(static_cast<GLsizei>(15), cmd.color_space_size); |
4721 EXPECT_EQ(static_cast<GLuint>(16), cmd.shm_offset); | 4721 EXPECT_EQ(static_cast<GLuint>(16), cmd.shm_id); |
| 4722 EXPECT_EQ(static_cast<GLuint>(17), cmd.shm_offset); |
4722 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); | 4723 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
4723 } | 4724 } |
4724 | 4725 |
4725 TEST_F(GLES2FormatTest, MatrixLoadfCHROMIUMImmediate) { | 4726 TEST_F(GLES2FormatTest, MatrixLoadfCHROMIUMImmediate) { |
4726 const int kSomeBaseValueToTestWith = 51; | 4727 const int kSomeBaseValueToTestWith = 51; |
4727 static GLfloat data[] = { | 4728 static GLfloat data[] = { |
4728 static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), | 4729 static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), |
4729 static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), | 4730 static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), |
4730 static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), | 4731 static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), |
4731 static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), | 4732 static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5333 *GetBufferAs<cmds::SetEnableDCLayersCHROMIUM>(); | 5334 *GetBufferAs<cmds::SetEnableDCLayersCHROMIUM>(); |
5334 void* next_cmd = cmd.Set(&cmd, static_cast<GLboolean>(11)); | 5335 void* next_cmd = cmd.Set(&cmd, static_cast<GLboolean>(11)); |
5335 EXPECT_EQ(static_cast<uint32_t>(cmds::SetEnableDCLayersCHROMIUM::kCmdId), | 5336 EXPECT_EQ(static_cast<uint32_t>(cmds::SetEnableDCLayersCHROMIUM::kCmdId), |
5336 cmd.header.command); | 5337 cmd.header.command); |
5337 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 5338 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
5338 EXPECT_EQ(static_cast<GLboolean>(11), cmd.enabled); | 5339 EXPECT_EQ(static_cast<GLboolean>(11), cmd.enabled); |
5339 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); | 5340 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
5340 } | 5341 } |
5341 | 5342 |
5342 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 5343 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
OLD | NEW |