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

@@ -51,7 +51,7 @@ TextureClientPool::GetTextureClient()
if (gfxPrefs::ForceShmemTiles()) {
textureClient = TextureClient::CreateBufferTextureClient(mSurfaceAllocator, mFormat, TEXTURE_IMMEDIATE_UPLOAD);
} else {
textureClient = TextureClient::CreateTextureClientForDrawing(mSurfaceAllocator, mFormat, TEXTURE_IMMEDIATE_UPLOAD);
textureClient = TextureClient::CreateTextureClientForDrawing(mSurfaceAllocator, mFormat, TEXTURE_IMMEDIATE_UPLOAD, mSize);
}
textureClient->AsTextureClientDrawTarget()->AllocateForSurface(mSize, ALLOC_DEFAULT);