Bug 877115 - Moz2Dify GLContext and GLTextureImage. r=nical
This commit is contained in:
@@ -178,10 +178,9 @@ TextureImageTextureSourceOGL::GetSize() const
|
||||
{
|
||||
if (mTexImage) {
|
||||
if (mIterating) {
|
||||
nsIntRect rect = mTexImage->GetTileRect();
|
||||
return gfx::IntSize(rect.width, rect.height);
|
||||
return mTexImage->GetTileRect().Size();
|
||||
}
|
||||
return gfx::IntSize(mTexImage->GetSize().width, mTexImage->GetSize().height);
|
||||
return mTexImage->GetSize();
|
||||
}
|
||||
NS_WARNING("Trying to query the size of an empty TextureSource.");
|
||||
return gfx::IntSize(0, 0);
|
||||
@@ -194,6 +193,11 @@ TextureImageTextureSourceOGL::GetFormat() const
|
||||
return mTexImage->GetTextureFormat();
|
||||
}
|
||||
|
||||
nsIntRect TextureImageTextureSourceOGL::GetTileRect()
|
||||
{
|
||||
return ThebesIntRect(mTexImage->GetTileRect());
|
||||
}
|
||||
|
||||
void
|
||||
TextureImageTextureSourceOGL::BindTexture(GLenum aTextureUnit)
|
||||
{
|
||||
@@ -358,14 +362,18 @@ TextureImageDeprecatedTextureHostOGL::GetSize() const
|
||||
{
|
||||
if (mTexture) {
|
||||
if (mIterating) {
|
||||
nsIntRect rect = mTexture->GetTileRect();
|
||||
return gfx::IntSize(rect.width, rect.height);
|
||||
return mTexture->GetTileRect().Size();
|
||||
}
|
||||
return gfx::IntSize(mTexture->GetSize().width, mTexture->GetSize().height);
|
||||
return mTexture->GetSize();
|
||||
}
|
||||
return gfx::IntSize(0, 0);
|
||||
}
|
||||
|
||||
nsIntRect TextureImageDeprecatedTextureHostOGL::GetTileRect()
|
||||
{
|
||||
return ThebesIntRect(mTexture->GetTileRect());
|
||||
}
|
||||
|
||||
void
|
||||
TextureImageDeprecatedTextureHostOGL::SetCompositor(Compositor* aCompositor)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user