mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 781056; remove extraneous save/restores from DrawTargetCairo. r=bas
--HG-- extra : rebase_source : d3c9d94d3263c50bc0d4bae42b6d58f3f5b07a0b
This commit is contained in:
parent
aefa4c2893
commit
bc4f4c3f06
@ -347,7 +347,6 @@ DrawTargetCairo::DrawSurface(SourceSurface *aSurface,
|
||||
cairo_pattern_set_filter(pat, GfxFilterToCairoFilter(aSurfOptions.mFilter));
|
||||
cairo_pattern_set_extend(pat, CAIRO_EXTEND_PAD);
|
||||
|
||||
cairo_save(mContext);
|
||||
cairo_translate(mContext, aDest.X(), aDest.Y());
|
||||
|
||||
if (OperatorAffectsUncoveredAreas(aOptions.mCompositionOp) ||
|
||||
@ -369,8 +368,6 @@ DrawTargetCairo::DrawSurface(SourceSurface *aSurface,
|
||||
|
||||
cairo_paint_with_alpha(mContext, aOptions.mAlpha);
|
||||
|
||||
cairo_restore(mContext);
|
||||
|
||||
cairo_pattern_destroy(pat);
|
||||
}
|
||||
|
||||
@ -543,8 +540,6 @@ DrawTargetCairo::CopySurface(SourceSurface *aSurface,
|
||||
|
||||
cairo_surface_t* surf = static_cast<SourceSurfaceCairo*>(aSurface)->GetSurface();
|
||||
|
||||
cairo_save(mContext);
|
||||
|
||||
cairo_identity_matrix(mContext);
|
||||
|
||||
cairo_set_source_surface(mContext, surf, aDest.x - aSource.x, aDest.y - aSource.y);
|
||||
@ -554,8 +549,6 @@ DrawTargetCairo::CopySurface(SourceSurface *aSurface,
|
||||
cairo_new_path(mContext);
|
||||
cairo_rectangle(mContext, aDest.x, aDest.y, aSource.width, aSource.height);
|
||||
cairo_fill(mContext);
|
||||
|
||||
cairo_restore(mContext);
|
||||
}
|
||||
|
||||
void
|
||||
@ -563,15 +556,11 @@ DrawTargetCairo::ClearRect(const Rect& aRect)
|
||||
{
|
||||
AutoPrepareForDrawing prep(this, mContext);
|
||||
|
||||
cairo_save(mContext);
|
||||
|
||||
cairo_new_path(mContext);
|
||||
cairo_set_operator(mContext, CAIRO_OPERATOR_CLEAR);
|
||||
cairo_rectangle(mContext, aRect.X(), aRect.Y(),
|
||||
aRect.Width(), aRect.Height());
|
||||
cairo_fill(mContext);
|
||||
|
||||
cairo_restore(mContext);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user