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 3978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3989 EXPECT_EQ(sizeof(cmd) + | 3989 EXPECT_EQ(sizeof(cmd) + |
3990 RoundSizeToMultipleOfEntries(sizeof(data)), | 3990 RoundSizeToMultipleOfEntries(sizeof(data)), |
3991 cmd.header.size * 4u); | 3991 cmd.header.size * 4u); |
3992 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); | 3992 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
3993 CheckBytesWrittenMatchesExpectedSize( | 3993 CheckBytesWrittenMatchesExpectedSize( |
3994 next_cmd, sizeof(cmd) + | 3994 next_cmd, sizeof(cmd) + |
3995 RoundSizeToMultipleOfEntries(sizeof(data))); | 3995 RoundSizeToMultipleOfEntries(sizeof(data))); |
3996 // TODO(gman): Check that data was inserted; | 3996 // TODO(gman): Check that data was inserted; |
3997 } | 3997 } |
3998 | 3998 |
| 3999 TEST_F(GLES2FormatTest, TexImagePixmap2DCHROMIUM) { |
| 4000 TexImagePixmap2DCHROMIUM& cmd = *GetBufferAs<TexImagePixmap2DCHROMIUM>(); |
| 4001 void* next_cmd = cmd.Set( |
| 4002 &cmd, |
| 4003 static_cast<GLenum>(11), |
| 4004 static_cast<GLuint>(12)); |
| 4005 EXPECT_EQ(static_cast<uint32>(TexImagePixmap2DCHROMIUM::kCmdId), |
| 4006 cmd.header.command); |
| 4007 EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u); |
| 4008 EXPECT_EQ(static_cast<GLenum>(11), cmd.target); |
| 4009 EXPECT_EQ(static_cast<GLuint>(12), cmd.pixmapId); |
| 4010 CheckBytesWrittenMatchesExpectedSize( |
| 4011 next_cmd, sizeof(cmd)); |
| 4012 } |
| 4013 |
3999 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ | 4014 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_TEST_AUTOGEN_H_ |
4000 | 4015 |
OLD | NEW |