зеркало из https://github.com/mozilla/gecko-dev.git
Bug 877115 - [Moz2Dify] Part 1. Remove ImageFormat typedef from GLContext. (r=nical)
This commit is contained in:
Родитель
7590ac07be
Коммит
aef8f7cc05
|
@ -2159,19 +2159,19 @@ GLContext::ReadPixelsIntoImageSurface(gfxImageSurface* dest)
|
|||
if (DebugMode()) {
|
||||
NS_WARNING("Needing intermediary surface for ReadPixels. This will be slow!");
|
||||
}
|
||||
ImageFormat readFormatGFX;
|
||||
SurfaceFormat readFormatGFX;
|
||||
|
||||
switch (readFormat) {
|
||||
case LOCAL_GL_RGBA:
|
||||
case LOCAL_GL_BGRA: {
|
||||
readFormatGFX = hasAlpha ? gfxImageFormatARGB32
|
||||
: gfxImageFormatRGB24;
|
||||
readFormatGFX = hasAlpha ? FORMAT_B8G8R8A8
|
||||
: FORMAT_B8G8R8X8;
|
||||
break;
|
||||
}
|
||||
case LOCAL_GL_RGB: {
|
||||
MOZ_ASSERT(readPixelSize == 2);
|
||||
MOZ_ASSERT(readType == LOCAL_GL_UNSIGNED_SHORT_5_6_5_REV);
|
||||
readFormatGFX = gfxImageFormatRGB16_565;
|
||||
readFormatGFX = FORMAT_R5G6B5;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
@ -2200,7 +2200,9 @@ GLContext::ReadPixelsIntoImageSurface(gfxImageSurface* dest)
|
|||
}
|
||||
}
|
||||
|
||||
tempSurf = new gfxImageSurface(dest->GetSize(), readFormatGFX, false);
|
||||
tempSurf = new gfxImageSurface(dest->GetSize(),
|
||||
SurfaceFormatToImageFormat(readFormatGFX),
|
||||
false);
|
||||
readSurf = tempSurf;
|
||||
} else {
|
||||
readPixelSize = destPixelSize;
|
||||
|
|
|
@ -2377,7 +2377,6 @@ protected:
|
|||
|
||||
typedef class gfx::SharedSurface SharedSurface;
|
||||
typedef gfx::SharedSurfaceType SharedSurfaceType;
|
||||
typedef gfxImageFormat ImageFormat;
|
||||
typedef gfx::SurfaceFormat SurfaceFormat;
|
||||
|
||||
public:
|
||||
|
|
Загрузка…
Ссылка в новой задаче