diff options
Diffstat (limited to 'dom/media/MediaData.h')
-rw-r--r-- | dom/media/MediaData.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dom/media/MediaData.h b/dom/media/MediaData.h index dc93c84872..7e93541baa 100644 --- a/dom/media/MediaData.h +++ b/dom/media/MediaData.h @@ -622,15 +622,22 @@ private: class MediaRawData : public MediaData { public: MediaRawData(); - MediaRawData(const uint8_t* aData, size_t mSize); + MediaRawData(const uint8_t* aData, size_t aSize); + MediaRawData(const uint8_t* aData, size_t aSize, + const uint8_t* aAlphaData, size_t aAlphaSize); // Pointer to data or null if not-yet allocated const uint8_t* Data() const { return mBuffer.Data(); } + // Pointer to alpha data or null if not-yet allocated + const uint8_t* AlphaData() const { return mAlphaBuffer.Data(); } // Size of buffer. size_t Size() const { return mBuffer.Length(); } + size_t AlphaSize() const { return mAlphaBuffer.Length(); } size_t ComputedSizeOfIncludingThis() const { - return sizeof(*this) + mBuffer.ComputedSizeOfExcludingThis(); + return sizeof(*this) + + mBuffer.ComputedSizeOfExcludingThis() + + mAlphaBuffer.ComputedSizeOfExcludingThis(); } // Access the buffer as a Span. operator Span<const uint8_t>() { return MakeSpan(Data(), Size()); } @@ -661,6 +668,7 @@ protected: private: friend class MediaRawDataWriter; AlignedByteBuffer mBuffer; + AlignedByteBuffer mAlphaBuffer; CryptoSample mCryptoInternal; MediaRawData(const MediaRawData&); // Not implemented }; |