Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_format_autogen.h

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 15926 matching lines...) Expand 10 before | Expand all | Expand 10 after
15937 uint32_t enabled; 15937 uint32_t enabled;
15938 }; 15938 };
15939 15939
15940 static_assert(sizeof(SetEnableDCLayersCHROMIUM) == 8, 15940 static_assert(sizeof(SetEnableDCLayersCHROMIUM) == 8,
15941 "size of SetEnableDCLayersCHROMIUM should be 8"); 15941 "size of SetEnableDCLayersCHROMIUM should be 8");
15942 static_assert(offsetof(SetEnableDCLayersCHROMIUM, header) == 0, 15942 static_assert(offsetof(SetEnableDCLayersCHROMIUM, header) == 0,
15943 "offset of SetEnableDCLayersCHROMIUM header should be 0"); 15943 "offset of SetEnableDCLayersCHROMIUM header should be 0");
15944 static_assert(offsetof(SetEnableDCLayersCHROMIUM, enabled) == 4, 15944 static_assert(offsetof(SetEnableDCLayersCHROMIUM, enabled) == 4,
15945 "offset of SetEnableDCLayersCHROMIUM enabled should be 4"); 15945 "offset of SetEnableDCLayersCHROMIUM enabled should be 4");
15946 15946
15947 struct InitializeDiscardableTextureCHROMIUM {
15948 typedef InitializeDiscardableTextureCHROMIUM ValueType;
15949 static const CommandId kCmdId = kInitializeDiscardableTextureCHROMIUM;
15950 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
15951 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
15952
15953 static uint32_t ComputeSize() {
15954 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
15955 }
15956
15957 void SetHeader() { header.SetCmd<ValueType>(); }
15958
15959 void Init(GLuint _texture_id, uint32_t _shm_id, uint32_t _shm_offset) {
15960 SetHeader();
15961 texture_id = _texture_id;
15962 shm_id = _shm_id;
15963 shm_offset = _shm_offset;
15964 }
15965
15966 void* Set(void* cmd,
15967 GLuint _texture_id,
15968 uint32_t _shm_id,
15969 uint32_t _shm_offset) {
15970 static_cast<ValueType*>(cmd)->Init(_texture_id, _shm_id, _shm_offset);
15971 return NextCmdAddress<ValueType>(cmd);
15972 }
15973
15974 gpu::CommandHeader header;
15975 uint32_t texture_id;
15976 uint32_t shm_id;
15977 uint32_t shm_offset;
15978 };
15979
15980 static_assert(sizeof(InitializeDiscardableTextureCHROMIUM) == 16,
15981 "size of InitializeDiscardableTextureCHROMIUM should be 16");
15982 static_assert(
15983 offsetof(InitializeDiscardableTextureCHROMIUM, header) == 0,
15984 "offset of InitializeDiscardableTextureCHROMIUM header should be 0");
15985 static_assert(
15986 offsetof(InitializeDiscardableTextureCHROMIUM, texture_id) == 4,
15987 "offset of InitializeDiscardableTextureCHROMIUM texture_id should be 4");
15988 static_assert(
15989 offsetof(InitializeDiscardableTextureCHROMIUM, shm_id) == 8,
15990 "offset of InitializeDiscardableTextureCHROMIUM shm_id should be 8");
15991 static_assert(
15992 offsetof(InitializeDiscardableTextureCHROMIUM, shm_offset) == 12,
15993 "offset of InitializeDiscardableTextureCHROMIUM shm_offset should be 12");
15994
15995 struct UnlockDiscardableTextureCHROMIUM {
15996 typedef UnlockDiscardableTextureCHROMIUM ValueType;
15997 static const CommandId kCmdId = kUnlockDiscardableTextureCHROMIUM;
15998 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
15999 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
16000
16001 static uint32_t ComputeSize() {
16002 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
16003 }
16004
16005 void SetHeader() { header.SetCmd<ValueType>(); }
16006
16007 void Init(GLuint _texture_id) {
16008 SetHeader();
16009 texture_id = _texture_id;
16010 }
16011
16012 void* Set(void* cmd, GLuint _texture_id) {
16013 static_cast<ValueType*>(cmd)->Init(_texture_id);
16014 return NextCmdAddress<ValueType>(cmd);
16015 }
16016
16017 gpu::CommandHeader header;
16018 uint32_t texture_id;
16019 };
16020
16021 static_assert(sizeof(UnlockDiscardableTextureCHROMIUM) == 8,
16022 "size of UnlockDiscardableTextureCHROMIUM should be 8");
16023 static_assert(offsetof(UnlockDiscardableTextureCHROMIUM, header) == 0,
16024 "offset of UnlockDiscardableTextureCHROMIUM header should be 0");
16025 static_assert(
16026 offsetof(UnlockDiscardableTextureCHROMIUM, texture_id) == 4,
16027 "offset of UnlockDiscardableTextureCHROMIUM texture_id should be 4");
16028
16029 struct LockDiscardableTextureCHROMIUM {
16030 typedef LockDiscardableTextureCHROMIUM ValueType;
16031 static const CommandId kCmdId = kLockDiscardableTextureCHROMIUM;
16032 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
16033 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
16034
16035 static uint32_t ComputeSize() {
16036 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
16037 }
16038
16039 void SetHeader() { header.SetCmd<ValueType>(); }
16040
16041 void Init(GLuint _texture_id) {
16042 SetHeader();
16043 texture_id = _texture_id;
16044 }
16045
16046 void* Set(void* cmd, GLuint _texture_id) {
16047 static_cast<ValueType*>(cmd)->Init(_texture_id);
16048 return NextCmdAddress<ValueType>(cmd);
16049 }
16050
16051 gpu::CommandHeader header;
16052 uint32_t texture_id;
16053 };
16054
16055 static_assert(sizeof(LockDiscardableTextureCHROMIUM) == 8,
16056 "size of LockDiscardableTextureCHROMIUM should be 8");
16057 static_assert(offsetof(LockDiscardableTextureCHROMIUM, header) == 0,
16058 "offset of LockDiscardableTextureCHROMIUM header should be 0");
16059 static_assert(
16060 offsetof(LockDiscardableTextureCHROMIUM, texture_id) == 4,
16061 "offset of LockDiscardableTextureCHROMIUM texture_id should be 4");
16062
15947 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 16063 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/discardable_handle.cc ('k') | gpu/command_buffer/common/gles2_cmd_format_test_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698