Bug 958001 - Remove mNeverUseDeviceSurface from imgFrame, r=jrmuizel

This commit is contained in:
Michael Wu 2014-01-17 08:57:51 -05:00
Родитель d59746be3b
Коммит 70ead73d9d
2 изменённых файлов: 3 добавлений и 5 удалений

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

@ -110,7 +110,6 @@ imgFrame::imgFrame() :
mLockCount(0),
mBlendMethod(1), /* imgIContainer::kBlendOver */
mSinglePixel(false),
mNeverUseDeviceSurface(false),
mFormatChanged(false),
mCompositingFailed(false),
mNonPremult(false),
@ -178,7 +177,7 @@ nsresult imgFrame::Init(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight,
// going to) so that the image surface can wrap it. Can't be done
// the other way around.
#ifdef USE_WIN_SURFACE
if (!mNeverUseDeviceSurface && !ShouldUseImageSurfaces()) {
if (!ShouldUseImageSurfaces()) {
mWinSurface = new gfxWindowsSurface(gfxIntSize(mSize.width, mSize.height), mFormat);
if (mWinSurface && mWinSurface->CairoStatus() == 0) {
// no error
@ -208,7 +207,7 @@ nsresult imgFrame::Init(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight,
}
#ifdef XP_MACOSX
if (!mNeverUseDeviceSurface && !ShouldUseImageSurfaces()) {
if (!ShouldUseImageSurfaces()) {
mQuartzSurface = new gfxQuartzImageSurface(mImageSurface);
}
#endif
@ -291,7 +290,7 @@ nsresult imgFrame::Optimize()
// if we're being forced to use image surfaces due to
// resource constraints, don't try to optimize beyond same-pixel.
if (mNeverUseDeviceSurface || ShouldUseImageSurfaces())
if (ShouldUseImageSurfaces())
return NS_OK;
mOptSurface = nullptr;

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

@ -171,7 +171,6 @@ private: // data
uint8_t mPaletteDepth;
int8_t mBlendMethod;
bool mSinglePixel;
bool mNeverUseDeviceSurface;
bool mFormatChanged;
bool mCompositingFailed;
bool mNonPremult;