mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 728524 - Minor rework for TexImage filter setup. r=bgirard
This commit is contained in:
parent
319610caaa
commit
e6fc0043e3
@ -376,8 +376,8 @@ ShadowCanvasLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
||||
mOGLManager->GetProgram(mTexImage->GetShaderProgramType(),
|
||||
GetMaskLayer());
|
||||
|
||||
|
||||
gfx3DMatrix effectiveTransform = GetEffectiveTransform();
|
||||
gfxPattern::GraphicsFilter filter = mFilter;
|
||||
#ifdef ANDROID
|
||||
// Bug 691354
|
||||
// Using the LINEAR filter we get unexplained artifacts.
|
||||
@ -385,15 +385,10 @@ ShadowCanvasLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
||||
gfxMatrix matrix;
|
||||
bool is2D = GetEffectiveTransform().Is2D(&matrix);
|
||||
if (is2D && !matrix.HasNonTranslationOrFlip()) {
|
||||
mTexImage->SetFilter(gfxPattern::FILTER_NEAREST);
|
||||
} else {
|
||||
mTexImage->SetFilter(mFilter);
|
||||
filter = gfxPattern::FILTER_NEAREST;
|
||||
}
|
||||
#else
|
||||
mTexImage->SetFilter(mFilter);
|
||||
#endif
|
||||
|
||||
|
||||
program->Activate();
|
||||
program->SetLayerTransform(effectiveTransform);
|
||||
program->SetLayerOpacity(GetEffectiveOpacity());
|
||||
@ -401,6 +396,7 @@ ShadowCanvasLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
||||
program->SetTextureUnit(0);
|
||||
program->LoadMask(GetMaskLayer());
|
||||
|
||||
mTexImage->SetFilter(filter);
|
||||
mTexImage->BeginTileIteration();
|
||||
if (gl()->CanUploadNonPowerOfTwo()) {
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user