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