Bug 1265824 - Remove CreateForYCbCrWithBufferSize r=mattwoodrow

This seems to be unused. Not sure if it's still left in here for
a reason or not.

MozReview-Commit-ID: 3wxaCDI7eCO

--HG--
extra : rebase_source : 25dda76dce892e580dbf31741e359d3a78f5742a
This commit is contained in:
Doug Thayer 2018-07-22 20:22:12 -07:00
parent 9b62998d60
commit 68e5aaf03a
4 changed files with 0 additions and 69 deletions

View file

@ -161,34 +161,6 @@ BufferTextureData::CreateInternal(LayersIPCChannel* aAllocator,
}
}
BufferTextureData*
BufferTextureData::CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
int32_t aBufferSize,
YUVColorSpace aYUVColorSpace,
uint32_t aBitDepth,
TextureFlags aTextureFlags)
{
if (aBufferSize == 0 || !gfx::Factory::CheckBufferSize(aBufferSize)) {
return nullptr;
}
bool hasIntermediateBuffer = aAllocator ? ComputeHasIntermediateBuffer(gfx::SurfaceFormat::YUV,
aAllocator->GetCompositorBackendType(),
aAllocator->SupportsTextureDirectMapping())
: true;
// Initialize the metadata with something, even if it will have to be rewritten
// afterwards since we don't know the dimensions of the texture at this point.
BufferDescriptor desc = YCbCrDescriptor(gfx::IntSize(), 0, gfx::IntSize(), 0,
0, 0, 0, StereoMode::MONO,
aYUVColorSpace,
aBitDepth,
hasIntermediateBuffer);
return CreateInternal(aAllocator ? aAllocator->GetTextureForwarder() : nullptr,
desc, gfx::BackendType::NONE, aBufferSize, aTextureFlags);
}
BufferTextureData*
BufferTextureData::CreateForYCbCr(KnowsCompositor* aAllocator,
gfx::IntSize aYSize,

View file

@ -40,15 +40,6 @@ public:
uint32_t aBitDepth,
TextureFlags aTextureFlags);
// It is generally better to use CreateForYCbCr instead.
// This creates a half-initialized texture since we don't know the sizes and
// offsets in the buffer.
static BufferTextureData* CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
int32_t aSize,
YUVColorSpace aYUVColorSpace,
uint32_t aBitDepth,
TextureFlags aTextureFlags);
virtual bool Lock(OpenMode aMode) override { return true; }
virtual void Unlock() override {}

View file

@ -1330,28 +1330,6 @@ 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)

View file

@ -379,16 +379,6 @@ public:
TextureFlags aTextureFlags,
TextureAllocationFlags flags = ALLOC_DEFAULT);
// Creates and allocates a TextureClient (can beaccessed through raw
// pointers) with a certain buffer size. It's unfortunate that we need this.
// providing format and sizes could let us do more optimization.
static already_AddRefed<TextureClient>
CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
size_t aSize,
YUVColorSpace aYUVColorSpace,
uint32_t aBitDepth,
TextureFlags aTextureFlags);
// Creates and allocates a TextureClient of the same type.
already_AddRefed<TextureClient>
CreateSimilar(LayersBackend aLayersBackend = LayersBackend::LAYERS_NONE,