Bug 1484101 - Ensure DrawTargetTiled::PadEdges is called with region in device space. r=rhunt

In MultiTiledContentClient we can create a DrawTargetTiled with a
different origin than the layer we are painting. We must therefore
ensure when edge-padding that we provide the valid region in the draw
target's device-space rather than layer-space. Not doing so was
causing us to pad out in incorrect directions, causing visible seams.

Differential Revision: https://phabricator.services.mozilla.com/D3993

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jamie Nicol 2018-08-22 16:29:52 +00:00
parent 1e7897dcaa
commit c0b13f02f6
2 changed files with 2 additions and 1 deletions

View File

@ -1300,6 +1300,7 @@ public:
/**
* Performs an in-place edge padding operation.
* aRegion is specified in device space.
*/
virtual void PadEdges(const IntRegion& aRegion);

View File

@ -270,7 +270,7 @@ void ClientMultiTiledLayerBuffer::Update(const nsIntRegion& newValidRegion,
// Edge padding allows us to avoid resampling artifacts
if (gfxPrefs::TileEdgePaddingEnabled() && mResolution == 1) {
drawTarget->PadEdges(newValidRegion);
drawTarget->PadEdges(newValidRegion.MovedBy(-mTilingOrigin));
}
// Reset