back out bug 874721, bug 899435

This commit is contained in:
Nicholas Cameron
2013-08-01 18:30:46 +12:00
parent 3dd70a33a3
commit b0e54709d1
61 changed files with 278 additions and 2213 deletions

View File

@@ -64,16 +64,8 @@ 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();