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 15881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15892 uint32_t enabled; | 15892 uint32_t enabled; |
15893 }; | 15893 }; |
15894 | 15894 |
15895 static_assert(sizeof(SetEnableDCLayersCHROMIUM) == 8, | 15895 static_assert(sizeof(SetEnableDCLayersCHROMIUM) == 8, |
15896 "size of SetEnableDCLayersCHROMIUM should be 8"); | 15896 "size of SetEnableDCLayersCHROMIUM should be 8"); |
15897 static_assert(offsetof(SetEnableDCLayersCHROMIUM, header) == 0, | 15897 static_assert(offsetof(SetEnableDCLayersCHROMIUM, header) == 0, |
15898 "offset of SetEnableDCLayersCHROMIUM header should be 0"); | 15898 "offset of SetEnableDCLayersCHROMIUM header should be 0"); |
15899 static_assert(offsetof(SetEnableDCLayersCHROMIUM, enabled) == 4, | 15899 static_assert(offsetof(SetEnableDCLayersCHROMIUM, enabled) == 4, |
15900 "offset of SetEnableDCLayersCHROMIUM enabled should be 4"); | 15900 "offset of SetEnableDCLayersCHROMIUM enabled should be 4"); |
15901 | 15901 |
| 15902 struct InitializeDiscardableTextureCHROMIUM { |
| 15903 typedef InitializeDiscardableTextureCHROMIUM ValueType; |
| 15904 static const CommandId kCmdId = kInitializeDiscardableTextureCHROMIUM; |
| 15905 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 15906 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 15907 |
| 15908 static uint32_t ComputeSize() { |
| 15909 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 15910 } |
| 15911 |
| 15912 void SetHeader() { header.SetCmd<ValueType>(); } |
| 15913 |
| 15914 void Init(GLuint _texture_id, uint32_t _shm_id, uint32_t _shm_offset) { |
| 15915 SetHeader(); |
| 15916 texture_id = _texture_id; |
| 15917 shm_id = _shm_id; |
| 15918 shm_offset = _shm_offset; |
| 15919 } |
| 15920 |
| 15921 void* Set(void* cmd, |
| 15922 GLuint _texture_id, |
| 15923 uint32_t _shm_id, |
| 15924 uint32_t _shm_offset) { |
| 15925 static_cast<ValueType*>(cmd)->Init(_texture_id, _shm_id, _shm_offset); |
| 15926 return NextCmdAddress<ValueType>(cmd); |
| 15927 } |
| 15928 |
| 15929 gpu::CommandHeader header; |
| 15930 uint32_t texture_id; |
| 15931 uint32_t shm_id; |
| 15932 uint32_t shm_offset; |
| 15933 }; |
| 15934 |
| 15935 static_assert(sizeof(InitializeDiscardableTextureCHROMIUM) == 16, |
| 15936 "size of InitializeDiscardableTextureCHROMIUM should be 16"); |
| 15937 static_assert( |
| 15938 offsetof(InitializeDiscardableTextureCHROMIUM, header) == 0, |
| 15939 "offset of InitializeDiscardableTextureCHROMIUM header should be 0"); |
| 15940 static_assert( |
| 15941 offsetof(InitializeDiscardableTextureCHROMIUM, texture_id) == 4, |
| 15942 "offset of InitializeDiscardableTextureCHROMIUM texture_id should be 4"); |
| 15943 static_assert( |
| 15944 offsetof(InitializeDiscardableTextureCHROMIUM, shm_id) == 8, |
| 15945 "offset of InitializeDiscardableTextureCHROMIUM shm_id should be 8"); |
| 15946 static_assert( |
| 15947 offsetof(InitializeDiscardableTextureCHROMIUM, shm_offset) == 12, |
| 15948 "offset of InitializeDiscardableTextureCHROMIUM shm_offset should be 12"); |
| 15949 |
| 15950 struct UnlockDiscardableTextureCHROMIUM { |
| 15951 typedef UnlockDiscardableTextureCHROMIUM ValueType; |
| 15952 static const CommandId kCmdId = kUnlockDiscardableTextureCHROMIUM; |
| 15953 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 15954 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 15955 |
| 15956 static uint32_t ComputeSize() { |
| 15957 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 15958 } |
| 15959 |
| 15960 void SetHeader() { header.SetCmd<ValueType>(); } |
| 15961 |
| 15962 void Init(GLuint _texture_id) { |
| 15963 SetHeader(); |
| 15964 texture_id = _texture_id; |
| 15965 } |
| 15966 |
| 15967 void* Set(void* cmd, GLuint _texture_id) { |
| 15968 static_cast<ValueType*>(cmd)->Init(_texture_id); |
| 15969 return NextCmdAddress<ValueType>(cmd); |
| 15970 } |
| 15971 |
| 15972 gpu::CommandHeader header; |
| 15973 uint32_t texture_id; |
| 15974 }; |
| 15975 |
| 15976 static_assert(sizeof(UnlockDiscardableTextureCHROMIUM) == 8, |
| 15977 "size of UnlockDiscardableTextureCHROMIUM should be 8"); |
| 15978 static_assert(offsetof(UnlockDiscardableTextureCHROMIUM, header) == 0, |
| 15979 "offset of UnlockDiscardableTextureCHROMIUM header should be 0"); |
| 15980 static_assert( |
| 15981 offsetof(UnlockDiscardableTextureCHROMIUM, texture_id) == 4, |
| 15982 "offset of UnlockDiscardableTextureCHROMIUM texture_id should be 4"); |
| 15983 |
15902 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15984 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |