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

Unified Diff: ppapi/c/ppb_image_data.h

Issue 5674004: Add compile assertions to enforce the sizes of all structs and enums in the C... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
Index: ppapi/c/ppb_image_data.h
===================================================================
--- ppapi/c/ppb_image_data.h (revision 68603)
+++ ppapi/c/ppb_image_data.h (working copy)
@@ -6,6 +6,7 @@
#define PPAPI_C_PPB_IMAGE_DATA_H_
#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_size.h"
@@ -15,6 +16,7 @@
PP_IMAGEDATAFORMAT_BGRA_PREMUL,
PP_IMAGEDATAFORMAT_RGBA_PREMUL
} PP_ImageDataFormat;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_ImageDataFormat, 4);
struct PP_ImageDataDesc {
PP_ImageDataFormat format;
@@ -26,6 +28,7 @@
// may be padding at the end of the lines.
int32_t stride;
};
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_ImageDataDesc, 16);
#define PPB_IMAGEDATA_INTERFACE "PPB_ImageData;0.2"
« ppapi/c/dev/pp_video_dev.h ('K') | « ppapi/c/ppb_class.h ('k') | ppapi/c/ppb_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698