diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 19:17:18 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 19:17:18 +0000 |
commit | 614fbce1f56c31abfe94b6fcd4f450371c3c50f5 (patch) | |
tree | e2dbd7588b9d42e4eaedb923f06724bb7c99e678 /o3d/command_buffer | |
parent | 715482ad5d7bf8f73eef8120e0a1e857f844088f (diff) | |
download | chromium_src-614fbce1f56c31abfe94b6fcd4f450371c3c50f5.zip chromium_src-614fbce1f56c31abfe94b6fcd4f450371c3c50f5.tar.gz chromium_src-614fbce1f56c31abfe94b6fcd4f450371c3c50f5.tar.bz2 |
Removed core\cross\packing.h. Using approach consistent with Chrome. #pragma pack works in both MSVC and GCC.
http://gcc.gnu.org/onlinedocs/gcc/Structure_002dPacking-Pragmas.html
Review URL: http://codereview.chromium.org/373005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/command_buffer')
-rw-r--r-- | o3d/command_buffer/common/cross/cmd_buffer_common.h | 5 | ||||
-rw-r--r-- | o3d/command_buffer/common/cross/o3d_cmd_format.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/o3d/command_buffer/common/cross/cmd_buffer_common.h b/o3d/command_buffer/common/cross/cmd_buffer_common.h index 2ce3e3f..8934c94 100644 --- a/o3d/command_buffer/common/cross/cmd_buffer_common.h +++ b/o3d/command_buffer/common/cross/cmd_buffer_common.h @@ -39,7 +39,6 @@ #include "command_buffer/common/cross/types.h" #include "command_buffer/common/cross/bitfield_helpers.h" #include "command_buffer/common/cross/logging.h" -#include "core/cross/packing.h" namespace command_buffer { @@ -105,7 +104,7 @@ COMPILE_ASSERT(sizeof(CommandBufferEntry) == 4, // Make sure the compiler does not add extra padding to any of the command // structures. -O3D_PUSH_STRUCTURE_PACKING_1; +#pragma pack(push, 1) // Gets the address of memory just after a structure in a typesafe way. This is // used for IMMEDIATE commands to get the address of the place to put the data. @@ -240,7 +239,7 @@ COMPILE_ASSERT(offsetof(SetToken, token) == 4, } // namespace cmd -O3D_POP_STRUCTURE_PACKING; +#pragma pack(pop) } // namespace command_buffer diff --git a/o3d/command_buffer/common/cross/o3d_cmd_format.h b/o3d/command_buffer/common/cross/o3d_cmd_format.h index a75deed..9830774 100644 --- a/o3d/command_buffer/common/cross/o3d_cmd_format.h +++ b/o3d/command_buffer/common/cross/o3d_cmd_format.h @@ -242,7 +242,7 @@ const char* GetCommandName(CommandId id); // Make sure the compiler does not add extra padding to any of the command // structures. -O3D_PUSH_STRUCTURE_PACKING_1; +#pragma pack(push, 1) struct BeginFrame { typedef BeginFrame ValueType; @@ -3147,7 +3147,7 @@ COMPILE_ASSERT(sizeof(SetBackSurfaces) == 4, COMPILE_ASSERT(offsetof(SetBackSurfaces, header) == 0, OffsetOf_SetBackSurfaces_header_not_0); -O3D_POP_STRUCTURE_PACKING; +#pragma pack(pop) } // namespace o3d } // namespace command_buffer |