зеркало из https://github.com/mozilla/gecko-dev.git
Bug 970711 - Make basic compositor respect TexturedEffect filter (r=mattwoodrow)
This commit is contained in:
Родитель
6021b6d2f1
Коммит
d35c527b82
|
@ -293,6 +293,7 @@ DrawSurfaceWithTextureCoords(DrawTarget *aDest,
|
||||||
const gfx::Rect& aDestRect,
|
const gfx::Rect& aDestRect,
|
||||||
SourceSurface *aSource,
|
SourceSurface *aSource,
|
||||||
const gfx::Rect& aTextureCoords,
|
const gfx::Rect& aTextureCoords,
|
||||||
|
gfx::Filter aFilter,
|
||||||
float aOpacity,
|
float aOpacity,
|
||||||
SourceSurface *aMask,
|
SourceSurface *aMask,
|
||||||
const Matrix& aMaskTransform)
|
const Matrix& aMaskTransform)
|
||||||
|
@ -316,13 +317,13 @@ DrawSurfaceWithTextureCoords(DrawTarget *aDest,
|
||||||
Matrix dtTransform = aDest->GetTransform();
|
Matrix dtTransform = aDest->GetTransform();
|
||||||
aDest->SetTransform(aMaskTransform);
|
aDest->SetTransform(aMaskTransform);
|
||||||
Matrix patternMatrix = maskTransformInverse * dtTransform * matrix;
|
Matrix patternMatrix = maskTransformInverse * dtTransform * matrix;
|
||||||
aDest->MaskSurface(SurfacePattern(aSource, ExtendMode::REPEAT, patternMatrix),
|
aDest->MaskSurface(SurfacePattern(aSource, ExtendMode::REPEAT, patternMatrix, aFilter),
|
||||||
aMask, Point(), DrawOptions(aOpacity));
|
aMask, Point(), DrawOptions(aOpacity));
|
||||||
aDest->SetTransform(dtTransform);
|
aDest->SetTransform(dtTransform);
|
||||||
aDest->PopClip();
|
aDest->PopClip();
|
||||||
} else {
|
} else {
|
||||||
aDest->FillRect(aDestRect,
|
aDest->FillRect(aDestRect,
|
||||||
SurfacePattern(aSource, ExtendMode::REPEAT, matrix),
|
SurfacePattern(aSource, ExtendMode::REPEAT, matrix, aFilter),
|
||||||
DrawOptions(aOpacity));
|
DrawOptions(aOpacity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -487,6 +488,7 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
||||||
DrawSurfaceWithTextureCoords(dest, aRect,
|
DrawSurfaceWithTextureCoords(dest, aRect,
|
||||||
source->GetSurface(),
|
source->GetSurface(),
|
||||||
texturedEffect->mTextureCoords,
|
texturedEffect->mTextureCoords,
|
||||||
|
texturedEffect->mFilter,
|
||||||
aOpacity, sourceMask, maskTransform);
|
aOpacity, sourceMask, maskTransform);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -504,6 +506,7 @@ BasicCompositor::DrawQuad(const gfx::Rect& aRect,
|
||||||
DrawSurfaceWithTextureCoords(dest, aRect,
|
DrawSurfaceWithTextureCoords(dest, aRect,
|
||||||
sourceSurf,
|
sourceSurf,
|
||||||
effectRenderTarget->mTextureCoords,
|
effectRenderTarget->mTextureCoords,
|
||||||
|
effectRenderTarget->mFilter,
|
||||||
aOpacity, sourceMask, maskTransform);
|
aOpacity, sourceMask, maskTransform);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче