mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1209801 - Part 2: Do not allow big image textures to be used with TiledLayerBuffers. r=mattwoodrow
Big-image textures (where multiple textures are tiled together to act as a single larger texture, e.g. TiledTextureImage) were in some cases being used to back the TextureSources associated with each Tile in a TiledLayerBuffer. CompositorOGL was unaware of this, so when compositing would only render the first tile in each big image, stretching it to the size of the entire big image. It doesn't make much sense to allow tiling-within-tiling, so set the DISALLOW_BIGIMAGE flag for textures created for use with TiledLayerBuffers. --- gfx/layers/client/SingleTiledContentClient.cpp | 2 +- gfx/layers/client/TiledContentClient.cpp | 2 +- gfx/layers/composite/TextureHost.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
This commit is contained in:
parent
c13ab94c8e
commit
22bfcfd371
@ -110,7 +110,7 @@ ClientSingleTiledLayerBuffer::GetTextureClient()
|
||||
{
|
||||
return mCompositableClient->CreateTextureClientForDrawing(
|
||||
gfx::ImageFormatToSurfaceFormat(mFormat), mSize, BackendSelector::Content,
|
||||
TextureFlags::IMMEDIATE_UPLOAD);
|
||||
TextureFlags::DISALLOW_BIGIMAGE | TextureFlags::IMMEDIATE_UPLOAD);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1241,7 +1241,7 @@ ClientMultiTiledLayerBuffer::ValidateTile(TileClient& aTile,
|
||||
aTile.SetLayerManager(mManager);
|
||||
aTile.SetTextureAllocator(mManager->GetTexturePool(
|
||||
gfxPlatform::GetPlatform()->Optimal2DFormatForContent(content),
|
||||
TextureFlags::IMMEDIATE_UPLOAD));
|
||||
TextureFlags::DISALLOW_BIGIMAGE | TextureFlags::IMMEDIATE_UPLOAD));
|
||||
}
|
||||
aTile.SetCompositableClient(mCompositableClient);
|
||||
|
||||
|
@ -599,7 +599,7 @@ BufferTextureHost::Upload(nsIntRegion *aRegion)
|
||||
} else {
|
||||
// non-YCbCr case
|
||||
if (!mFirstSource) {
|
||||
mFirstSource = mCompositor->CreateDataTextureSource();
|
||||
mFirstSource = mCompositor->CreateDataTextureSource(mFlags);
|
||||
}
|
||||
ImageDataDeserializer deserializer(GetBuffer(), GetBufferSize());
|
||||
if (!deserializer.IsValid()) {
|
||||
|
Loading…
Reference in New Issue
Block a user