diff options
author | tsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-29 01:33:04 +0000 |
---|---|---|
committer | tsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-29 01:33:04 +0000 |
commit | d32de8702e109980100b73228c9d4ba94f26b94e (patch) | |
tree | 77a7936f4dfa8cd69da3935389223df4f1f80114 | |
parent | e1c31657b303e6b510a259c6759a8ec14c4991bb (diff) | |
download | chromium_src-d32de8702e109980100b73228c9d4ba94f26b94e.zip chromium_src-d32de8702e109980100b73228c9d4ba94f26b94e.tar.gz chromium_src-d32de8702e109980100b73228c9d4ba94f26b94e.tar.bz2 |
Apply automatic range checks to CC enum types across IPC.
This is part of a long-running background task to remove the remaining
uses of the unchecked IPC_ENUM_TRAITS() macro.
BUG=246708
Review URL: https://codereview.chromium.org/149033003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247569 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/output/filter_operation.h | 1 | ||||
-rw-r--r-- | cc/quads/draw_quad.h | 1 | ||||
-rw-r--r-- | cc/quads/io_surface_draw_quad.h | 3 | ||||
-rw-r--r-- | content/common/cc_messages.h | 8 |
4 files changed, 9 insertions, 4 deletions
diff --git a/cc/output/filter_operation.h b/cc/output/filter_operation.h index f5c6a82..7b48242 100644 --- a/cc/output/filter_operation.h +++ b/cc/output/filter_operation.h @@ -37,6 +37,7 @@ class CC_EXPORT FilterOperation { ZOOM, REFERENCE, SATURATING_BRIGHTNESS, // Not used in CSS/SVG. + FILTER_TYPE_LAST = SATURATING_BRIGHTNESS }; FilterOperation(const FilterOperation& other); diff --git a/cc/quads/draw_quad.h b/cc/quads/draw_quad.h index 236e074..1803eb3 100644 --- a/cc/quads/draw_quad.h +++ b/cc/quads/draw_quad.h @@ -43,6 +43,7 @@ class CC_EXPORT DrawQuad { TEXTURE_CONTENT, TILED_CONTENT, YUV_VIDEO_CONTENT, + MATERIAL_LAST = YUV_VIDEO_CONTENT }; virtual ~DrawQuad(); diff --git a/cc/quads/io_surface_draw_quad.h b/cc/quads/io_surface_draw_quad.h index c2307ce..9a9fa09 100644 --- a/cc/quads/io_surface_draw_quad.h +++ b/cc/quads/io_surface_draw_quad.h @@ -16,7 +16,8 @@ class CC_EXPORT IOSurfaceDrawQuad : public DrawQuad { public: enum Orientation { FLIPPED, - UNFLIPPED + UNFLIPPED, + ORIENTATION_LAST = UNFLIPPED }; static scoped_ptr<IOSurfaceDrawQuad> Create(); diff --git a/content/common/cc_messages.h b/content/common/cc_messages.h index d1a9129..790e768 100644 --- a/content/common/cc_messages.h +++ b/content/common/cc_messages.h @@ -116,9 +116,11 @@ struct CONTENT_EXPORT ParamTraits<cc::DelegatedFrameData> { #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT -IPC_ENUM_TRAITS(cc::DrawQuad::Material) -IPC_ENUM_TRAITS(cc::IOSurfaceDrawQuad::Orientation) -IPC_ENUM_TRAITS(cc::FilterOperation::FilterType) +IPC_ENUM_TRAITS_MAX_VALUE(cc::DrawQuad::Material, cc::DrawQuad::MATERIAL_LAST) +IPC_ENUM_TRAITS_MAX_VALUE(cc::IOSurfaceDrawQuad::Orientation, + cc::IOSurfaceDrawQuad::ORIENTATION_LAST) +IPC_ENUM_TRAITS_MAX_VALUE(cc::FilterOperation::FilterType, + cc::FilterOperation::FILTER_TYPE_LAST ) IPC_ENUM_TRAITS_MAX_VALUE(cc::ResourceFormat, cc::RESOURCE_FORMAT_MAX) IPC_ENUM_TRAITS_MAX_VALUE(SkXfermode::Mode, SkXfermode::kLastMode) |