Bug 978086: Fix initialization order in LayerRenderState, r=nical
authorThomas Zimmermann <tdz@users.sourceforge.net>
Mon, 03 Mar 2014 09:15:00 +0100
changeset 171860 22cf29b4730334092b4fa5659844e4171130bb27
parent 171859 80fb5e44810eda7aa2f0ca72cf167ba2ee3766c1
child 171861 7f0c5d0392a3d6ec778be8f6c3d41ba13456b0e1
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersnical
bugs978086
milestone30.0a1
Bug 978086: Fix initialization order in LayerRenderState, r=nical C++ requires constructors to initialize fields in the order of the fields' definitions.
gfx/layers/LayersTypes.h
--- a/gfx/layers/LayersTypes.h
+++ b/gfx/layers/LayersTypes.h
@@ -84,30 +84,30 @@ enum LayerRenderStateFlags {
   LAYER_RENDER_STATE_FORMAT_RB_SWAP = 1 << 2
 };
 
 // The 'ifdef MOZ_WIDGET_GONK' sadness here is because we don't want to include
 // android::sp unless we have to.
 struct LayerRenderState {
   LayerRenderState()
 #ifdef MOZ_WIDGET_GONK
-    : mSurface(nullptr), mFlags(0), mHasOwnOffset(false), mTexture(nullptr)
+    : mSurface(nullptr), mTexture(nullptr), mFlags(0), mHasOwnOffset(false)
 #endif
   {}
 
 #ifdef MOZ_WIDGET_GONK
   LayerRenderState(android::GraphicBuffer* aSurface,
                    const nsIntSize& aSize,
                    uint32_t aFlags,
                    TextureHost* aTexture)
     : mSurface(aSurface)
     , mSize(aSize)
+    , mTexture(aTexture)
     , mFlags(aFlags)
     , mHasOwnOffset(false)
-    , mTexture(aTexture)
   {}
 
   bool YFlipped() const
   { return mFlags & LAYER_RENDER_STATE_Y_FLIPPED; }
 
   bool BufferRotated() const
   { return mFlags & LAYER_RENDER_STATE_BUFFER_ROTATION; }