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 4685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4696 cmd.header.command); | 4696 cmd.header.command); |
4697 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 4697 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
4698 EXPECT_EQ(static_cast<GLfloat>(11), cmd.opacity); | 4698 EXPECT_EQ(static_cast<GLfloat>(11), cmd.opacity); |
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, SetDCLayerTextureCHROMIUM) { |
| 4707 cmds::SetDCLayerTextureCHROMIUM& cmd = |
| 4708 *GetBufferAs<cmds::SetDCLayerTextureCHROMIUM>(); |
| 4709 void* next_cmd = |
| 4710 cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12)); |
| 4711 EXPECT_EQ(static_cast<uint32_t>(cmds::SetDCLayerTextureCHROMIUM::kCmdId), |
| 4712 cmd.header.command); |
| 4713 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 4714 EXPECT_EQ(static_cast<GLuint>(11), cmd.index); |
| 4715 EXPECT_EQ(static_cast<GLuint>(12), cmd.contents_texture_id); |
| 4716 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
| 4717 } |
| 4718 |
4706 TEST_F(GLES2FormatTest, ScheduleDCLayerCHROMIUM) { | 4719 TEST_F(GLES2FormatTest, ScheduleDCLayerCHROMIUM) { |
4707 cmds::ScheduleDCLayerCHROMIUM& cmd = | 4720 cmds::ScheduleDCLayerCHROMIUM& cmd = |
4708 *GetBufferAs<cmds::ScheduleDCLayerCHROMIUM>(); | 4721 *GetBufferAs<cmds::ScheduleDCLayerCHROMIUM>(); |
4709 void* next_cmd = | 4722 void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11), |
4710 cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12), | 4723 static_cast<GLuint>(12), static_cast<GLuint>(13), |
4711 static_cast<GLuint>(13), static_cast<GLuint>(14), | 4724 static_cast<GLuint>(14), static_cast<GLuint>(15)); |
4712 static_cast<GLuint>(15), static_cast<GLuint>(16)); | |
4713 EXPECT_EQ(static_cast<uint32_t>(cmds::ScheduleDCLayerCHROMIUM::kCmdId), | 4725 EXPECT_EQ(static_cast<uint32_t>(cmds::ScheduleDCLayerCHROMIUM::kCmdId), |
4714 cmd.header.command); | 4726 cmd.header.command); |
4715 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 4727 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
4716 EXPECT_EQ(static_cast<GLuint>(11), cmd.contents_texture_id); | 4728 EXPECT_EQ(static_cast<GLuint>(11), cmd.background_color); |
4717 EXPECT_EQ(static_cast<GLuint>(12), cmd.background_color); | 4729 EXPECT_EQ(static_cast<GLuint>(12), cmd.edge_aa_mask); |
4718 EXPECT_EQ(static_cast<GLuint>(13), cmd.edge_aa_mask); | 4730 EXPECT_EQ(static_cast<GLuint>(13), cmd.filter); |
4719 EXPECT_EQ(static_cast<GLuint>(14), cmd.filter); | 4731 EXPECT_EQ(static_cast<GLuint>(14), cmd.shm_id); |
4720 EXPECT_EQ(static_cast<GLuint>(15), cmd.shm_id); | 4732 EXPECT_EQ(static_cast<GLuint>(15), cmd.shm_offset); |
4721 EXPECT_EQ(static_cast<GLuint>(16), cmd.shm_offset); | |
4722 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); | 4733 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
4723 } | 4734 } |
4724 | 4735 |
4725 TEST_F(GLES2FormatTest, MatrixLoadfCHROMIUMImmediate) { | 4736 TEST_F(GLES2FormatTest, MatrixLoadfCHROMIUMImmediate) { |
4726 const int kSomeBaseValueToTestWith = 51; | 4737 const int kSomeBaseValueToTestWith = 51; |
4727 static GLfloat data[] = { | 4738 static GLfloat data[] = { |
4728 static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), | 4739 static_cast<GLfloat>(kSomeBaseValueToTestWith + 0), |
4729 static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), | 4740 static_cast<GLfloat>(kSomeBaseValueToTestWith + 1), |
4730 static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), | 4741 static_cast<GLfloat>(kSomeBaseValueToTestWith + 2), |
4731 static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), | 4742 static_cast<GLfloat>(kSomeBaseValueToTestWith + 3), |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5333 *GetBufferAs<cmds::SetEnableDCLayersCHROMIUM>(); | 5344 *GetBufferAs<cmds::SetEnableDCLayersCHROMIUM>(); |
5334 void* next_cmd = cmd.Set(&cmd, static_cast<GLboolean>(11)); | 5345 void* next_cmd = cmd.Set(&cmd, static_cast<GLboolean>(11)); |
5335 EXPECT_EQ(static_cast<uint32_t>(cmds::SetEnableDCLayersCHROMIUM::kCmdId), | 5346 EXPECT_EQ(static_cast<uint32_t>(cmds::SetEnableDCLayersCHROMIUM::kCmdId), |
5336 cmd.header.command); | 5347 cmd.header.command); |
5337 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); | 5348 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
5338 EXPECT_EQ(static_cast<GLboolean>(11), cmd.enabled); | 5349 EXPECT_EQ(static_cast<GLboolean>(11), cmd.enabled); |
5339 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); | 5350 CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); |
5340 } | 5351 } |
5341 | 5352 |
5342 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 5353 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
OLD | NEW |