mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1095925: Propagate the error up the chain. r=jmuizelaar
This commit is contained in:
parent
8414202025
commit
8aa1b59e6c
@ -1480,8 +1480,9 @@ DrawTargetCairo::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFo
|
||||
|
||||
if (!cairo_surface_status(similar)) {
|
||||
RefPtr<DrawTargetCairo> target = new DrawTargetCairo();
|
||||
target->InitAlreadyReferenced(similar, aSize);
|
||||
return target.forget();
|
||||
if (target->InitAlreadyReferenced(similar, aSize)) {
|
||||
return target.forget();
|
||||
}
|
||||
}
|
||||
|
||||
gfxCriticalError() << "Failed to create similar cairo surface! Size: " << aSize << " Status: " << cairo_surface_status(similar);
|
||||
@ -1537,8 +1538,11 @@ DrawTargetCairo::CreateShadowDrawTarget(const IntSize &aSize, SurfaceFormat aFor
|
||||
// operations in graphics memory.
|
||||
if (aSigma == 0.0F) {
|
||||
RefPtr<DrawTargetCairo> target = new DrawTargetCairo();
|
||||
target->InitAlreadyReferenced(similar, aSize);
|
||||
return target.forget();
|
||||
if (target->InitAlreadyReferenced(similar, aSize)) {
|
||||
return target.forget();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
cairo_surface_t* blursurf = cairo_image_surface_create(CAIRO_FORMAT_A8,
|
||||
@ -1560,8 +1564,10 @@ DrawTargetCairo::CreateShadowDrawTarget(const IntSize &aSize, SurfaceFormat aFor
|
||||
cairo_surface_destroy(similar);
|
||||
|
||||
RefPtr<DrawTargetCairo> target = new DrawTargetCairo();
|
||||
target->InitAlreadyReferenced(tee, aSize);
|
||||
return target.forget();
|
||||
if (target->InitAlreadyReferenced(tee, aSize)) {
|
||||
return target.forget();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -711,7 +711,7 @@ BufferTextureClient::AllocateForSurface(gfx::IntSize aSize, TextureAllocationFla
|
||||
{
|
||||
MOZ_ASSERT(IsValid());
|
||||
MOZ_ASSERT(mFormat != gfx::SurfaceFormat::YUV, "This textureClient cannot use YCbCr data");
|
||||
MOZ_ASSERT(aSize.width * aSize.height);
|
||||
MOZ_ASSERT(aSize.width > 0 && aSize.height > 0);
|
||||
|
||||
int bufSize
|
||||
= ImageDataSerializer::ComputeMinBufferSize(aSize, mFormat);
|
||||
|
Loading…
Reference in New Issue
Block a user