зеркало из https://github.com/mozilla/gecko-dev.git
Bug 675210 - Postpone texture creation on Android to prevent internal format errors. r=mwoodrow
This commit is contained in:
Родитель
601ed53b80
Коммит
5d647f2d21
|
@ -1171,6 +1171,7 @@ public:
|
|||
} else {
|
||||
mShaderType = RGBALayerProgramType;
|
||||
}
|
||||
Resize(aSize);
|
||||
} else {
|
||||
// Convert RGB24 to either ARGB32 on mobile. We can't
|
||||
// generate GL_RGB data, so we'll always have an alpha byte
|
||||
|
@ -1185,9 +1186,6 @@ public:
|
|||
// We currently always use BGRA type textures
|
||||
mShaderType = BGRALayerProgramType;
|
||||
}
|
||||
|
||||
// We resize here so we should have a valid buffer after creation
|
||||
Resize(aSize);
|
||||
}
|
||||
|
||||
virtual ~TextureImageEGL()
|
||||
|
@ -1382,12 +1380,22 @@ public:
|
|||
|
||||
virtual void BindTexture(GLenum aTextureUnit)
|
||||
{
|
||||
// Ensure the texture is allocated before it is used.
|
||||
if (mTextureState == Created) {
|
||||
Resize(mSize);
|
||||
}
|
||||
|
||||
mGLContext->fActiveTexture(aTextureUnit);
|
||||
mGLContext->fBindTexture(LOCAL_GL_TEXTURE_2D, mTexture);
|
||||
mGLContext->fActiveTexture(LOCAL_GL_TEXTURE0);
|
||||
}
|
||||
|
||||
virtual GLuint GetTextureID() {
|
||||
virtual GLuint GetTextureID()
|
||||
{
|
||||
// Ensure the texture is allocated before it is used.
|
||||
if (mTextureState == Created) {
|
||||
Resize(mSize);
|
||||
}
|
||||
return mTexture;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче