зеркало из https://github.com/mozilla/gecko-dev.git
Bug 756601 - Round texture coords to the nearest texel. r=Bas
This commit is contained in:
Родитель
cea9782bd9
Коммит
b56f232983
|
@ -546,10 +546,10 @@ CompositorOGL::BindAndDrawQuadWithTextureRect(ShaderProgramOGL *aProg,
|
||||||
// We need to convert back to actual texels here to get proper behaviour with
|
// We need to convert back to actual texels here to get proper behaviour with
|
||||||
// our GL helper functions. Should fix this sometime.
|
// our GL helper functions. Should fix this sometime.
|
||||||
// I want to vomit.
|
// I want to vomit.
|
||||||
IntRect texCoordRect = IntRect(aTexCoordRect.x * aTexture->GetSize().width,
|
IntRect texCoordRect = IntRect(roundf(aTexCoordRect.x * aTexture->GetSize().width),
|
||||||
aTexCoordRect.y * aTexture->GetSize().height,
|
roundf(aTexCoordRect.y * aTexture->GetSize().height),
|
||||||
aTexCoordRect.width * aTexture->GetSize().width,
|
roundf(aTexCoordRect.width * aTexture->GetSize().width),
|
||||||
aTexCoordRect.height * aTexture->GetSize().height);
|
roundf(aTexCoordRect.height * aTexture->GetSize().height));
|
||||||
|
|
||||||
// This is fairly disgusting - if the texture should be flipped it will have a
|
// This is fairly disgusting - if the texture should be flipped it will have a
|
||||||
// negative height, in which case we un-invert the texture coords and pass the
|
// negative height, in which case we un-invert the texture coords and pass the
|
||||||
|
|
Загрузка…
Ссылка в новой задаче