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 15660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15671 "offset of SwapBuffersWithDamageCHROMIUM header should be 0"); | 15671 "offset of SwapBuffersWithDamageCHROMIUM header should be 0"); |
15672 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, x) == 4, | 15672 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, x) == 4, |
15673 "offset of SwapBuffersWithDamageCHROMIUM x should be 4"); | 15673 "offset of SwapBuffersWithDamageCHROMIUM x should be 4"); |
15674 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, y) == 8, | 15674 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, y) == 8, |
15675 "offset of SwapBuffersWithDamageCHROMIUM y should be 8"); | 15675 "offset of SwapBuffersWithDamageCHROMIUM y should be 8"); |
15676 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12, | 15676 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12, |
15677 "offset of SwapBuffersWithDamageCHROMIUM width should be 12"); | 15677 "offset of SwapBuffersWithDamageCHROMIUM width should be 12"); |
15678 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16, | 15678 static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16, |
15679 "offset of SwapBuffersWithDamageCHROMIUM height should be 16"); | 15679 "offset of SwapBuffersWithDamageCHROMIUM height should be 16"); |
15680 | 15680 |
| 15681 struct SetDrawRectangleCHROMIUM { |
| 15682 typedef SetDrawRectangleCHROMIUM ValueType; |
| 15683 static const CommandId kCmdId = kSetDrawRectangleCHROMIUM; |
| 15684 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 15685 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 15686 |
| 15687 static uint32_t ComputeSize() { |
| 15688 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 15689 } |
| 15690 |
| 15691 void SetHeader() { header.SetCmd<ValueType>(); } |
| 15692 |
| 15693 void Init(GLint _x, GLint _y, GLint _width, GLint _height) { |
| 15694 SetHeader(); |
| 15695 x = _x; |
| 15696 y = _y; |
| 15697 width = _width; |
| 15698 height = _height; |
| 15699 } |
| 15700 |
| 15701 void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) { |
| 15702 static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height); |
| 15703 return NextCmdAddress<ValueType>(cmd); |
| 15704 } |
| 15705 |
| 15706 gpu::CommandHeader header; |
| 15707 int32_t x; |
| 15708 int32_t y; |
| 15709 int32_t width; |
| 15710 int32_t height; |
| 15711 }; |
| 15712 |
| 15713 static_assert(sizeof(SetDrawRectangleCHROMIUM) == 20, |
| 15714 "size of SetDrawRectangleCHROMIUM should be 20"); |
| 15715 static_assert(offsetof(SetDrawRectangleCHROMIUM, header) == 0, |
| 15716 "offset of SetDrawRectangleCHROMIUM header should be 0"); |
| 15717 static_assert(offsetof(SetDrawRectangleCHROMIUM, x) == 4, |
| 15718 "offset of SetDrawRectangleCHROMIUM x should be 4"); |
| 15719 static_assert(offsetof(SetDrawRectangleCHROMIUM, y) == 8, |
| 15720 "offset of SetDrawRectangleCHROMIUM y should be 8"); |
| 15721 static_assert(offsetof(SetDrawRectangleCHROMIUM, width) == 12, |
| 15722 "offset of SetDrawRectangleCHROMIUM width should be 12"); |
| 15723 static_assert(offsetof(SetDrawRectangleCHROMIUM, height) == 16, |
| 15724 "offset of SetDrawRectangleCHROMIUM height should be 16"); |
| 15725 |
15681 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15726 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |