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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user