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