Bug 874721. Fallback for EnsureAllocated and compositor, and some more sanity checks. r=mattwoodrow
This commit is contained in:
@@ -64,8 +64,16 @@ CanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
||||
gfxASurface::gfxContentType contentType = isOpaque
|
||||
? gfxASurface::CONTENT_COLOR
|
||||
: gfxASurface::CONTENT_COLOR_ALPHA;
|
||||
mDeprecatedTextureClient->EnsureAllocated(aSize, contentType);
|
||||
|
||||
if (!mDeprecatedTextureClient->EnsureAllocated(aSize, contentType)) {
|
||||
mDeprecatedTextureClient = CreateDeprecatedTextureClient(TEXTURE_FALLBACK);
|
||||
if (!mDeprecatedTextureClient ||
|
||||
!mDeprecatedTextureClient->EnsureAllocated(aSize, contentType)) {
|
||||
NS_WARNING("Could not update texture, even with fallback texture client");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
gfxASurface* surface = mDeprecatedTextureClient->LockSurface();
|
||||
aLayer->UpdateSurface(surface);
|
||||
mDeprecatedTextureClient->Unlock();
|
||||
|
||||
Reference in New Issue
Block a user