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

Unified Diff: ppapi/c/pp_input_event.h

Issue 5001002: A second attempt at forcing 8-byte alignment of the time stamp.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/c/ppp_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/pp_input_event.h
===================================================================
--- ppapi/c/pp_input_event.h (revision 66151)
+++ ppapi/c/pp_input_event.h (working copy)
@@ -150,14 +150,15 @@
PP_Bool scroll_by_page;
};
-/* Ensure the elements of the struct (especially the time_stamp) are aligned on
- 8-byte boundaries, since some compilers align doubles on 8-byte boundaries
- for 32-bit x86, and some align on 4-byte boundaries. */
-#pragma pack(push, 8)
struct PP_InputEvent {
/** Identifies the type of the event. */
PP_InputEvent_Type type;
+ /* Ensure the time_stamp is aligned on an 8-byte boundary relative to the
+ start of the struct. Some compilers align doubles on 8-byte boundaries
+ for 32-bit x86, and some align on 4-byte boundaries. */
+ int32_t padding;
+
/**
* When this event was generated. This is not relative to any particular
* epoch, the most you can do is compare time stamps.
@@ -178,10 +179,7 @@
char padding[64];
} u;
};
-#pragma pack(pop)
-/* TODO(dmichael): Figure out why the input event is not 80 bytes wide on Mac.
PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80);
- */
/**
* @}
« no previous file with comments | « no previous file | ppapi/c/ppp_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698