Bug 1266878 - Fix off-by-one error in ParamTraits<StereoMode> - r=nical, a=lizzard
authorEdwin Flores <eflores@mozilla.com>
Mon, 25 Apr 2016 18:09:59 +0100
changeset 332661 d4e57dcb78d71fffd6b33088a11e051a294e5c14
parent 332660 09af2f25cbe6de5e712b797f67c989f0a8dacf8c
child 332662 fdf6664b4ed7b2bc3cb5bbb4037fab9c71162358
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical, lizzard
bugs1266878
milestone48.0a2
Bug 1266878 - Fix off-by-one error in ParamTraits<StereoMode> - r=nical, a=lizzard
gfx/ipc/GfxMessageUtils.h
gfx/layers/ImageTypes.h
--- a/gfx/ipc/GfxMessageUtils.h
+++ b/gfx/ipc/GfxMessageUtils.h
@@ -893,17 +893,17 @@ struct ParamTraits<mozilla::gfx::Surface
              mozilla::gfx::SurfaceFormat::UNKNOWN>
 {};
 
 template <>
 struct ParamTraits<mozilla::StereoMode>
   : public ContiguousEnumSerializer<
              mozilla::StereoMode,
              mozilla::StereoMode::MONO,
-             mozilla::StereoMode::TOP_BOTTOM>
+             mozilla::StereoMode::MAX>
 {};
 
 template <>
 struct ParamTraits<mozilla::layers::ScrollableLayerGuid>
 {
   typedef mozilla::layers::ScrollableLayerGuid paramType;
 
   static void Write(Message* aMsg, const paramType& aParam)
--- a/gfx/layers/ImageTypes.h
+++ b/gfx/layers/ImageTypes.h
@@ -94,14 +94,15 @@ enum class ImageFormat {
   TEXTURE_WRAPPER
 };
 
 enum class StereoMode {
   MONO,
   LEFT_RIGHT,
   RIGHT_LEFT,
   BOTTOM_TOP,
-  TOP_BOTTOM
+  TOP_BOTTOM,
+  MAX,
 };
 
 } // namespace mozilla
 
 #endif