зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1755975 - Pass rect or path directly to Clip() instead of manually creating a path. r=gfx-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D139038
This commit is contained in:
Родитель
f1ad25621f
Коммит
ee8edce30e
|
@ -264,9 +264,7 @@ bool SVGDrawingCallback::operator()(gfxContext* aContext,
|
|||
gfxContextAutoSaveRestore contextRestorer(aContext);
|
||||
|
||||
// Clip to aFillRect so that we don't paint outside.
|
||||
aContext->NewPath();
|
||||
aContext->Rectangle(aFillRect);
|
||||
aContext->Clip();
|
||||
aContext->Clip(aFillRect);
|
||||
|
||||
gfxMatrix matrix = aTransform;
|
||||
if (!matrix.Invert()) {
|
||||
|
|
|
@ -7575,9 +7575,7 @@ void nsDisplayText::RenderToContext(gfxContext* aCtx,
|
|||
|
||||
bool willClip = !aBuilder->IsForGenerateGlyphMask() && !aIsRecording;
|
||||
if (willClip) {
|
||||
aCtx->NewPath();
|
||||
aCtx->Rectangle(pixelVisible);
|
||||
aCtx->Clip();
|
||||
aCtx->Clip(pixelVisible);
|
||||
}
|
||||
|
||||
NS_ASSERTION(mVisIStartEdge >= 0, "illegal start edge");
|
||||
|
|
|
@ -28,14 +28,12 @@ namespace mozilla {
|
|||
/* static*/
|
||||
void CSSClipPathInstance::ApplyBasicShapeOrPathClip(
|
||||
gfxContext& aContext, nsIFrame* aFrame, const gfxMatrix& aTransform) {
|
||||
aContext.NewPath();
|
||||
RefPtr<Path> path =
|
||||
CreateClipPathForFrame(aContext.GetDrawTarget(), aFrame, aTransform);
|
||||
if (!path) {
|
||||
return;
|
||||
}
|
||||
aContext.SetPath(path);
|
||||
aContext.Clip();
|
||||
aContext.Clip(path);
|
||||
}
|
||||
|
||||
/* static*/
|
||||
|
|
|
@ -1180,9 +1180,7 @@ bool PaintFrameCallback::operator()(gfxContext* aContext,
|
|||
aContext->Save();
|
||||
|
||||
// Clip to aFillRect so that we don't paint outside.
|
||||
aContext->NewPath();
|
||||
aContext->Rectangle(aFillRect);
|
||||
aContext->Clip();
|
||||
aContext->Clip(aFillRect);
|
||||
|
||||
gfxMatrix invmatrix = aTransform;
|
||||
if (!invmatrix.Invert()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче