Bug 885016. Avoid using uninitiated extend in gfxPattern. r=bas

This changes gfxPattern to use GraphicsExtend. All of the inputs and outputs
are GraphicsExtend so there's no point storing it in a type of ExtendMode. We
also intialize gfxPattern to EXTEND_NONE when constructing it for Azure.

--HG--
extra : rebase_source : 576a620b45d5222a5548dd79520537d52ed5659e
This commit is contained in:
Jeff Muizelaar 2013-06-19 17:06:42 -04:00
Родитель 40fccc1fd4
Коммит 6f60fff27a
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -55,6 +55,7 @@ gfxPattern::gfxPattern(SourceSurface *aSurface, const Matrix &aTransform)
, mGfxPattern(NULL)
, mSourceSurface(aSurface)
, mTransform(aTransform)
, mExtend(EXTEND_NONE)
{
}
@ -323,7 +324,7 @@ gfxPattern::SetExtend(GraphicsExtend extend)
} else {
// This is always a surface pattern and will default to EXTEND_PAD
// for EXTEND_PAD_EDGE.
mExtend = ToExtendMode(extend);
mExtend = extend;
}
}
@ -358,7 +359,7 @@ gfxPattern::Extend() const
if (mPattern) {
return (GraphicsExtend)cairo_pattern_get_extend(mPattern);
} else {
return ThebesExtend(mExtend);
return mExtend;
}
}

Просмотреть файл

@ -136,7 +136,7 @@ protected:
mozilla::RefPtr<mozilla::gfx::SourceSurface> mSourceSurface;
mozilla::gfx::Matrix mTransform;
mozilla::RefPtr<mozilla::gfx::GradientStops> mStops;
mozilla::gfx::ExtendMode mExtend;
GraphicsExtend mExtend;
mozilla::gfx::Filter mFilter;
};