Bug 945314 - Workaround crash with Cairo surfaces in Skia backend. r=mstange

A patch for bug 924102 introduced a MOZ_CRASH assertion for surfaces
of type other than SURFACE_SKIA or SURFACE_DATA being passed to
DrawSurface. Previously surfaces of other types were simply ignored.
On Linux, there are still several hardcoded surfaces of type Cairo
(found in gfxXlibNativeRenderer and friends) and as a result, the
Skia backend crashes always on Linux currently.

This workaround ignores Cairo surfaces passed to DrawSurface.
This commit is contained in:
Kevin Simons 2013-12-03 08:52:06 -05:00
parent 71d185bc30
commit 9866760836

View File

@ -355,6 +355,10 @@ DrawTargetSkia::DrawSurface(SourceSurface *aSurface,
const DrawSurfaceOptions &aSurfOptions,
const DrawOptions &aOptions)
{
if (!(aSurface->GetType() == SURFACE_SKIA || aSurface->GetType() == SURFACE_DATA)) {
return;
}
if (aSource.IsEmpty()) {
return;
}