| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // DO NOT EDIT! | 7 // DO NOT EDIT! |
| 8 | 8 |
| 9 // This file contains unit tests for gles2 commmands | 9 // This file contains unit tests for gles2 commmands |
| 10 // It is included by gles2_cmd_format_test.cc | 10 // It is included by gles2_cmd_format_test.cc |
| (...skipping 4346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4357 cmd.header.command); | 4357 cmd.header.command); |
| 4358 EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); | 4358 EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u); |
| 4359 EXPECT_EQ(static_cast<GLenum>(1), cmd.target); | 4359 EXPECT_EQ(static_cast<GLenum>(1), cmd.target); |
| 4360 EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); | 4360 EXPECT_EQ(static_cast<GLsizei>(2), cmd.count); |
| 4361 CheckBytesWrittenMatchesExpectedSize( | 4361 CheckBytesWrittenMatchesExpectedSize( |
| 4362 next_cmd, sizeof(cmd) + | 4362 next_cmd, sizeof(cmd) + |
| 4363 RoundSizeToMultipleOfEntries(sizeof(data))); | 4363 RoundSizeToMultipleOfEntries(sizeof(data))); |
| 4364 // TODO(gman): Check that data was inserted; | 4364 // TODO(gman): Check that data was inserted; |
| 4365 } | 4365 } |
| 4366 | 4366 |
| 4367 TEST_F(GLES2FormatTest, LoseContextCHROMIUM) { |
| 4368 LoseContextCHROMIUM& cmd = *GetBufferAs<LoseContextCHROMIUM>(); |
| 4369 void* next_cmd = cmd.Set( |
| 4370 &cmd); |
| 4371 EXPECT_EQ(static_cast<uint32>(LoseContextCHROMIUM::kCmdId), |
| 4372 cmd.header.command); |
| 4373 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 4374 CheckBytesWrittenMatchesExpectedSize( |
| 4375 next_cmd, sizeof(cmd)); |
| 4376 } |
| 4377 |
| 4367 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 4378 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
| 4368 | 4379 |
| OLD | NEW |