mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 905790. Let canvases use fallback texure clients like images clients can. r=mattwoodrow
This commit is contained in:
parent
d45b9fe216
commit
41056e2efb
@ -109,7 +109,16 @@ DeprecatedCanvasClient2D::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);
|
||||
MOZ_ASSERT(mDeprecatedTextureClient, "Failed to create texture client");
|
||||
if (!mDeprecatedTextureClient->EnsureAllocated(aSize, contentType)) {
|
||||
NS_WARNING("Could not allocate texture client");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
gfxASurface* surface = mDeprecatedTextureClient->LockSurface();
|
||||
aLayer->UpdateSurface(surface);
|
||||
|
Loading…
Reference in New Issue
Block a user