mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 781731 - Fixed Azure Cairo GTK perf by removing xlib to buffered image conversion; r=Bas
This commit is contained in:
parent
14f7d80c2c
commit
a918455be9
@ -535,8 +535,21 @@ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurfa
|
|||||||
dt->Flush();
|
dt->Flush();
|
||||||
}
|
}
|
||||||
srcBuffer = aTarget->CreateSourceSurfaceFromNativeSurface(surf);
|
srcBuffer = aTarget->CreateSourceSurfaceFromNativeSurface(surf);
|
||||||
}
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
if (aSurface->CairoSurface()) {
|
||||||
|
// If this is an xlib cairo surface we don't want to fetch it into memory
|
||||||
|
// because this is a major slow down.
|
||||||
|
NativeSurface surf;
|
||||||
|
surf.mFormat = format;
|
||||||
|
surf.mType = NATIVE_SURFACE_CAIRO_SURFACE;
|
||||||
|
surf.mSurface = aSurface->CairoSurface();
|
||||||
|
srcBuffer = aTarget->CreateSourceSurfaceFromNativeSurface(surf);
|
||||||
|
|
||||||
|
// It's cheap enough to make a new one so we won't keep it around and
|
||||||
|
// keeping it creates a cycle.
|
||||||
|
return srcBuffer;
|
||||||
|
}
|
||||||
|
|
||||||
if (!srcBuffer) {
|
if (!srcBuffer) {
|
||||||
nsRefPtr<gfxImageSurface> imgSurface = aSurface->GetAsImageSurface();
|
nsRefPtr<gfxImageSurface> imgSurface = aSurface->GetAsImageSurface();
|
||||||
|
Loading…
Reference in New Issue
Block a user