Bug 962629 - Respect max texture size when creating Gralloc textures. r=nical

Add a size hint parameter to CreateTextureClientForDrawing, and use said
parameter to not create Gralloc surfaces that are bigger than the maximum
texture size.
This commit is contained in:
Chris Lord
2014-03-12 12:16:37 +00:00
parent fd7a91c539
commit 7afec73423
11 changed files with 34 additions and 16 deletions

View File

@@ -240,7 +240,7 @@ ImageClientSingle::UpdateImageInternal(ImageContainer* aContainer,
gfxImageFormat format
= gfxPlatform::GetPlatform()->OptimalFormatForContent(gfx::ContentForFormat(surface->GetFormat()));
mFrontBuffer = CreateTextureClientForDrawing(gfx::ImageFormatToSurfaceFormat(format),
mTextureFlags);
mTextureFlags, size);
MOZ_ASSERT(mFrontBuffer->AsTextureClientDrawTarget());
if (!mFrontBuffer->AsTextureClientDrawTarget()->AllocateForSurface(size)) {
mFrontBuffer = nullptr;