Bug 691061 - Don't use EXTEND_PAD on printing surfaces. r=jmuizelaar

This commit is contained in:
Adrian Johnson 2011-10-29 19:36:19 +10:30
parent c1001e17bf
commit 992a5d330a

View File

@ -77,6 +77,21 @@ PreparePatternForUntiledDrawing(gfxPattern* aPattern,
// the surface type.
switch (currentTarget->GetType()) {
// The printing surfaces don't natively support or need
// EXTEND_PAD for padding the edges. Using EXTEND_PAD this way
// is suboptimal as it will result in the printing surface
// creating a new image for each fill operation. The pattern
// will be painted to the image to pad out the pattern, then
// the new image will be used as the source. This increases
// printing time and memory use, and prevents the use of mime
// data from cairo_surface_set_mime_data(). Bug 691061.
case gfxASurface::SurfaceTypePDF:
case gfxASurface::SurfaceTypePS:
case gfxASurface::SurfaceTypeWin32Printing:
aPattern->SetExtend(gfxPattern::EXTEND_NONE);
aPattern->SetFilter(aDefaultFilter);
break;
#ifdef MOZ_X11
case gfxASurface::SurfaceTypeXlib:
{