зеркало из https://github.com/mozilla/gecko-dev.git
Bug 728524 - Invalid OP fix. r=jgilbert
This commit is contained in:
Родитель
85458f3b81
Коммит
72bbf76294
|
@ -1274,12 +1274,12 @@ PRUint32 TiledTextureImage::GetTileCount()
|
|||
}
|
||||
|
||||
GLContext::GLFormats
|
||||
GLContext::ChooseGLFormats(ContextFormat& aCF)
|
||||
GLContext::ChooseGLFormats(ContextFormat& aCF, ColorByteOrder aByteOrder)
|
||||
{
|
||||
GLFormats formats;
|
||||
|
||||
if (aCF.alpha) {
|
||||
if (mIsGLES2 && IsExtensionSupported(EXT_texture_format_BGRA8888)) {
|
||||
if (mIsGLES2 && IsExtensionSupported(EXT_texture_format_BGRA8888) && aByteOrder != ForceRGBA) {
|
||||
formats.texColor = LOCAL_GL_BGRA;
|
||||
} else {
|
||||
formats.texColor = LOCAL_GL_RGBA;
|
||||
|
|
|
@ -1726,7 +1726,12 @@ protected:
|
|||
GLsizei samples;
|
||||
};
|
||||
|
||||
GLFormats ChooseGLFormats(ContextFormat& aCF);
|
||||
enum ColorByteOrder {
|
||||
ForceRGBA,
|
||||
DefaultByteOrder
|
||||
};
|
||||
|
||||
GLFormats ChooseGLFormats(ContextFormat& aCF, GLContext::ColorByteOrder aByteOrder = GLContext::DefaultByteOrder);
|
||||
void CreateTextureForOffscreen(const GLFormats& aFormats, const gfxIntSize& aSize,
|
||||
GLuint& texture);
|
||||
void CreateRenderbuffersForOffscreen(const GLContext::GLFormats& aFormats, const gfxIntSize& aSize,
|
||||
|
|
|
@ -755,7 +755,7 @@ GLContextEGL::CreateSharedHandle(TextureImage::TextureShareType aType)
|
|||
MakeCurrent();
|
||||
GLuint texture = 0;
|
||||
ContextFormat fmt = ActualFormat();
|
||||
CreateTextureForOffscreen(ChooseGLFormats(fmt), mOffscreenSize, texture);
|
||||
CreateTextureForOffscreen(ChooseGLFormats(fmt, GLContext::ForceRGBA), mOffscreenSize, texture);
|
||||
// texture ownership moved to EGLTextureWrapper after this point
|
||||
// and texture will be deleted in EGLTextureWrapper dtor
|
||||
EGLTextureWrapper* tex = new EGLTextureWrapper(this, texture);
|
||||
|
|
Загрузка…
Ссылка в новой задаче