Backed out 10 changesets (bug 1265824) for causing reftests failures on global-composite-operation.html. CLOSED TREE
Backed out changeset 391c8e7897df (bug 1265824) Backed out changeset 27c7daabd1a3 (bug 1265824) Backed out changeset 7c90215a2eca (bug 1265824) Backed out changeset c141fb67cf9a (bug 1265824) Backed out changeset 239ab9f9ef52 (bug 1265824) Backed out changeset 39ae151b3d8c (bug 1265824) Backed out changeset 71b23fbe1fec (bug 1265824) Backed out changeset 295dd1a6a09f (bug 1265824) Backed out changeset 6aecd088e02c (bug 1265824) Backed out changeset bf9d73b214fc (bug 1265824)
This commit is contained in:
@@ -660,9 +660,7 @@ TextureClient::UpdateFromSurface(gfx::SourceSurface* aSurface)
|
||||
|
||||
|
||||
already_AddRefed<TextureClient>
|
||||
TextureClient::CreateSimilar(LayersBackend aLayersBackend,
|
||||
TextureFlags aFlags,
|
||||
TextureAllocationFlags aAllocFlags) const
|
||||
TextureClient::CreateSimilar(LayersBackend aLayersBackend, TextureFlags aFlags, TextureAllocationFlags aAllocFlags) const
|
||||
{
|
||||
MOZ_ASSERT(IsValid());
|
||||
|
||||
@@ -672,10 +670,7 @@ TextureClient::CreateSimilar(LayersBackend aLayersBackend,
|
||||
}
|
||||
|
||||
LockActor();
|
||||
TextureData* data = mData->CreateSimilar(mAllocator,
|
||||
aLayersBackend,
|
||||
aFlags,
|
||||
aAllocFlags);
|
||||
TextureData* data = mData->CreateSimilar(mAllocator, aLayersBackend, aFlags, aAllocFlags);
|
||||
UnlockActor();
|
||||
|
||||
if (!data) {
|
||||
@@ -1065,10 +1060,6 @@ TextureClient::CreateForDrawing(KnowsCompositor* aAllocator,
|
||||
TextureAllocationFlags aAllocFlags)
|
||||
{
|
||||
LayersBackend layersBackend = aAllocator->GetCompositorBackendType();
|
||||
if (aAllocator->SupportsTextureDirectMapping() &&
|
||||
std::max(aSize.width, aSize.height) <= aAllocator->GetMaxTextureSize()) {
|
||||
aAllocFlags = TextureAllocationFlags(aAllocFlags | ALLOC_ALLOW_DIRECT_MAPPING);
|
||||
}
|
||||
return TextureClient::CreateForDrawing(aAllocator->GetTextureForwarder(),
|
||||
aFormat, aSize,
|
||||
layersBackend,
|
||||
@@ -1235,16 +1226,6 @@ TextureClient::CreateForRawBufferAccess(KnowsCompositor* aAllocator,
|
||||
TextureFlags aTextureFlags,
|
||||
TextureAllocationFlags aAllocFlags)
|
||||
{
|
||||
// If we exceed the max texture size for the GPU, then just fall back to no
|
||||
// texture direct mapping. If it becomes a problem we can implement tiling
|
||||
// logic inside DirectMapTextureSource to allow this.
|
||||
bool supportsTextureDirectMapping = aAllocator->SupportsTextureDirectMapping() &&
|
||||
std::max(aSize.width, aSize.height) <= aAllocator->GetMaxTextureSize();
|
||||
if (supportsTextureDirectMapping) {
|
||||
aAllocFlags = TextureAllocationFlags(aAllocFlags | ALLOC_ALLOW_DIRECT_MAPPING);
|
||||
} else {
|
||||
aAllocFlags = TextureAllocationFlags(aAllocFlags & ~ALLOC_ALLOW_DIRECT_MAPPING);
|
||||
}
|
||||
return CreateForRawBufferAccess(aAllocator->GetTextureForwarder(),
|
||||
aFormat, aSize, aMoz2DBackend,
|
||||
aAllocator->GetCompositorBackendType(),
|
||||
@@ -1331,6 +1312,28 @@ TextureClient::CreateForYCbCr(KnowsCompositor* aAllocator,
|
||||
aAllocator->GetTextureForwarder());
|
||||
}
|
||||
|
||||
// static
|
||||
already_AddRefed<TextureClient>
|
||||
TextureClient::CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
|
||||
size_t aSize,
|
||||
YUVColorSpace aYUVColorSpace,
|
||||
uint32_t aBitDepth,
|
||||
TextureFlags aTextureFlags)
|
||||
{
|
||||
if (!aAllocator || !aAllocator->GetLayersIPCActor()->IPCOpen()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
TextureData* data = BufferTextureData::CreateForYCbCrWithBufferSize(
|
||||
aAllocator, aSize, aYUVColorSpace, aBitDepth, aTextureFlags);
|
||||
if (!data) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return MakeAndAddRef<TextureClient>(data, aTextureFlags,
|
||||
aAllocator->GetTextureForwarder());
|
||||
}
|
||||
|
||||
TextureClient::TextureClient(TextureData* aData,
|
||||
TextureFlags aFlags,
|
||||
LayersIPCChannel* aAllocator)
|
||||
|
||||
Reference in New Issue
Block a user