mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 970294 - Set our surface offset as a gfxContext device offset instead of a transform so that other callers don't accidentally overwrite it. r=nrc
This commit is contained in:
parent
f954df12ae
commit
cf387ac0d5
@ -961,8 +961,8 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||
return;
|
||||
}
|
||||
|
||||
nsRefPtr<gfxContext> groupTarget = new gfxContext(untransformedDT);
|
||||
groupTarget->Translate(gfxPoint(-bounds.x, -bounds.y));
|
||||
nsRefPtr<gfxContext> groupTarget = new gfxContext(untransformedDT,
|
||||
Point(bounds.x, bounds.y));
|
||||
|
||||
PaintSelfOrChildren(paintLayerContext, groupTarget);
|
||||
|
||||
@ -978,8 +978,7 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
|
||||
(aLayer->GetDebugColorIndex() & 4) ? 1.0 : 0.0,
|
||||
1.0);
|
||||
|
||||
nsRefPtr<gfxContext> temp = new gfxContext(untransformedDT);
|
||||
temp->Translate(gfxPoint(-bounds.x, -bounds.y));
|
||||
nsRefPtr<gfxContext> temp = new gfxContext(untransformedDT, Point(bounds.x, bounds.y));
|
||||
temp->SetColor(color);
|
||||
temp->Paint();
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ gfxContext::gfxContext(gfxASurface *surface)
|
||||
}
|
||||
}
|
||||
|
||||
gfxContext::gfxContext(DrawTarget *aTarget)
|
||||
gfxContext::gfxContext(DrawTarget *aTarget, const Point& aDeviceOffset)
|
||||
: mPathIsRect(false)
|
||||
, mTransformChanged(false)
|
||||
, mCairo(nullptr)
|
||||
@ -112,6 +112,7 @@ gfxContext::gfxContext(DrawTarget *aTarget)
|
||||
|
||||
mStateStack.SetLength(1);
|
||||
CurrentState().drawTarget = mDT;
|
||||
CurrentState().deviceOffset = aDeviceOffset;
|
||||
mDT->SetTransform(Matrix());
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,8 @@ public:
|
||||
* Strips any transform from aTarget.
|
||||
* aTarget will be flushed in the gfxContext's destructor.
|
||||
*/
|
||||
gfxContext(mozilla::gfx::DrawTarget *aTarget);
|
||||
gfxContext(mozilla::gfx::DrawTarget *aTarget,
|
||||
const mozilla::gfx::Point& aDeviceOffset = mozilla::gfx::Point());
|
||||
|
||||
~gfxContext();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user