mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1174220 - Part 1: Remove capacity constructor of MediaLargeByteBuffer. r=jya
This commit is contained in:
parent
a42b09b30a
commit
baee045959
@ -490,9 +490,10 @@ MediaRawData::MediaRawData()
|
|||||||
, mData(nullptr)
|
, mData(nullptr)
|
||||||
, mSize(0)
|
, mSize(0)
|
||||||
, mCrypto(mCryptoInternal)
|
, mCrypto(mCryptoInternal)
|
||||||
, mBuffer(new MediaLargeByteBuffer(RAW_DATA_DEFAULT_SIZE))
|
, mBuffer(new MediaByteBuffer())
|
||||||
, mPadding(0)
|
, mPadding(0)
|
||||||
{
|
{
|
||||||
|
unused << mBuffer->SetCapacity(RAW_DATA_DEFAULT_SIZE, fallible);
|
||||||
}
|
}
|
||||||
|
|
||||||
MediaRawData::MediaRawData(const uint8_t* aData, size_t aSize)
|
MediaRawData::MediaRawData(const uint8_t* aData, size_t aSize)
|
||||||
@ -500,7 +501,7 @@ MediaRawData::MediaRawData(const uint8_t* aData, size_t aSize)
|
|||||||
, mData(nullptr)
|
, mData(nullptr)
|
||||||
, mSize(0)
|
, mSize(0)
|
||||||
, mCrypto(mCryptoInternal)
|
, mCrypto(mCryptoInternal)
|
||||||
, mBuffer(new MediaLargeByteBuffer(RAW_DATA_DEFAULT_SIZE))
|
, mBuffer(new MediaByteBuffer())
|
||||||
, mPadding(0)
|
, mPadding(0)
|
||||||
{
|
{
|
||||||
if (!EnsureCapacity(aSize)) {
|
if (!EnsureCapacity(aSize)) {
|
||||||
|
@ -413,8 +413,6 @@ private:
|
|||||||
// It is designed to share potentially big byte arrays.
|
// It is designed to share potentially big byte arrays.
|
||||||
class MediaLargeByteBuffer : public FallibleTArray<uint8_t> {
|
class MediaLargeByteBuffer : public FallibleTArray<uint8_t> {
|
||||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaLargeByteBuffer);
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaLargeByteBuffer);
|
||||||
MediaLargeByteBuffer() = default;
|
|
||||||
explicit MediaLargeByteBuffer(size_t aCapacity) : FallibleTArray<uint8_t>(aCapacity) {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~MediaLargeByteBuffer() {}
|
~MediaLargeByteBuffer() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user