Bug 1391541 - Correct the transform for layers-free fallback. r=kats
MozReview-Commit-ID: v9hVeUmY3E
--- a/gfx/layers/wr/WebRenderLayerManager.cpp
+++ b/gfx/layers/wr/WebRenderLayerManager.cpp
@@ -435,22 +435,22 @@ PaintItemByDrawTarget(nsDisplayItem* aIt
DrawTarget* aDT,
const LayerRect& aImageRect,
const LayerPoint& aOffset,
nsDisplayListBuilder* aDisplayListBuilder)
{
MOZ_ASSERT(aDT);
aDT->ClearRect(aImageRect.ToUnknownRect());
- RefPtr<gfxContext> context = gfxContext::CreateOrNull(aDT, aOffset.ToUnknownPoint());
+ RefPtr<gfxContext> context = gfxContext::CreateOrNull(aDT);
MOZ_ASSERT(context);
+ context->SetMatrix(gfxMatrix::Translation(-aOffset.x, -aOffset.y));
switch (aItem->GetType()) {
case DisplayItemType::TYPE_MASK:
- context->SetMatrix(gfxMatrix::Translation(-aOffset.x, -aOffset.y));
static_cast<nsDisplayMask*>(aItem)->PaintMask(aDisplayListBuilder, context);
break;
case DisplayItemType::TYPE_FILTER:
{
RefPtr<BasicLayerManager> tempManager = new BasicLayerManager(BasicLayerManager::BLM_INACTIVE);
FrameLayerBuilder* layerBuilder = new FrameLayerBuilder();
layerBuilder->Init(aDisplayListBuilder, tempManager);