зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1069584: Bail if a cairo surface is in an invalid state. r=jrmuizel
This commit is contained in:
Родитель
d9721c0792
Коммит
b80e27d67f
|
@ -1388,6 +1388,13 @@ DrawTargetCairo::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFo
|
|||
bool
|
||||
DrawTargetCairo::InitAlreadyReferenced(cairo_surface_t* aSurface, const IntSize& aSize, SurfaceFormat* aFormat)
|
||||
{
|
||||
if (cairo_surface_status(aSurface)) {
|
||||
gfxCriticalError() << "Attempt to create DrawTarget for invalid surface. "
|
||||
<< aSize << " Cairo Status: " << cairo_surface_status(aSurface);
|
||||
cairo_surface_destroy(aSurface);
|
||||
return false;
|
||||
}
|
||||
|
||||
mContext = cairo_create(aSurface);
|
||||
mSurface = aSurface;
|
||||
mSize = aSize;
|
||||
|
|
Загрузка…
Ссылка в новой задаче