Backed out changeset 6d9cf51a012a (bug 949360) because of mochitest-3 timeouts on a CLOSED TREE

This commit is contained in:
Ehsan Akhgari 2013-12-12 11:26:24 -05:00
parent 745aee182f
commit 6efed042db
2 changed files with 14 additions and 22 deletions

View File

@ -490,17 +490,14 @@ PlanarYCbCrImage::CopyData(const Data& aData)
mData = aData;
// update buffer size
size_t size = mData.mCbCrStride * mData.mCbCrSize.height * 2 +
mBufferSize = mData.mCbCrStride * mData.mCbCrSize.height * 2 +
mData.mYStride * mData.mYSize.height;
// get new buffer
mBuffer = AllocateBuffer(size);
mBuffer = AllocateBuffer(mBufferSize);
if (!mBuffer)
return;
// update buffer size
mBufferSize = size;
mData.mYChannel = mBuffer;
mData.mCbChannel = mData.mYChannel + mData.mYStride * mData.mYSize.height;
mData.mCrChannel = mData.mCbChannel + mData.mCbCrStride * mData.mCbCrSize.height;
@ -539,12 +536,11 @@ PlanarYCbCrImage::SetDataNoCopy(const Data &aData)
uint8_t*
PlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
{
// update buffer size
mBufferSize = aSize;
// get new buffer
mBuffer = AllocateBuffer(aSize);
if (mBuffer) {
// update buffer size
mBufferSize = aSize;
}
mBuffer = AllocateBuffer(mBufferSize);
return mBuffer;
}

View File

@ -126,16 +126,14 @@ SharedPlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
{
NS_ABORT_IF_FALSE(!mTextureClient->IsAllocated(), "This image already has allocated data");
size_t size = YCbCrImageDataSerializer::ComputeMinBufferSize(aSize);
// get new buffer _without_ setting mBuffer.
if (!mTextureClient->Allocate(size)) {
return nullptr;
}
// update buffer size
mBufferSize = size;
// get new buffer _without_ setting mBuffer.
bool status = mTextureClient->Allocate(mBufferSize);
MOZ_ASSERT(status);
YCbCrImageDataSerializer serializer(mTextureClient->GetBuffer());
return serializer.GetData();
}
@ -250,19 +248,17 @@ DeprecatedSharedPlanarYCbCrImage::AllocateAndGetNewBuffer(uint32_t aSize)
{
NS_ABORT_IF_FALSE(!mAllocated, "This image already has allocated data");
size_t size = YCbCrImageDataSerializer::ComputeMinBufferSize(aSize);
// get new buffer _without_ setting mBuffer.
if (!AllocateBuffer(size)) {
return nullptr;
}
// update buffer size
mBufferSize = size;
// get new buffer _without_ setting mBuffer.
AllocateBuffer(mBufferSize);
YCbCrImageDataSerializer serializer(mShmem.get<uint8_t>());
return serializer.GetData();
}
void
DeprecatedSharedPlanarYCbCrImage::SetDataNoCopy(const Data &aData)
{