mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 877115 - [Moz2Dify] Part 1. Remove ImageFormat typedef from GLContext. (r=nical)
This commit is contained in:
parent
97b5bcb513
commit
c23b8e94f5
@ -2157,19 +2157,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: {
|
||||
@ -2198,7 +2198,9 @@ GLContext::ReadPixelsIntoImageSurface(gfxImageSurface* dest)
|
||||
}
|
||||
}
|
||||
|
||||
tempSurf = new gfxImageSurface(dest->GetSize(), readFormatGFX, false);
|
||||
tempSurf = new gfxImageSurface(dest->GetSize(),
|
||||
gfxImageFormat(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:
|
||||
|
Loading…
Reference in New Issue
Block a user