зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1781122 Part 1: Make ChromiumCDMParent mark its Images as DRM. r=media-playback-reviewers,gfx-reviewers,alwu,sotaro
This also modifies Image to track whether or not it is from a DRM source. Later parts of the patch move this characteristic into the textures that are used by compositors. Differential Revision: https://phabricator.services.mozilla.com/D155295
This commit is contained in:
Родитель
5cd05da10f
Коммит
2725370634
|
@ -974,6 +974,9 @@ already_AddRefed<VideoData> ChromiumCDMParent::CreateVideoFrame(
|
|||
media::TimeUnit::FromMicroseconds(aFrame.mDuration()), b, false,
|
||||
media::TimeUnit::FromMicroseconds(-1), pictureRegion, mKnowsCompositor);
|
||||
|
||||
// This is a DRM image.
|
||||
v->mImage->SetIsDRM(true);
|
||||
|
||||
return v.forget();
|
||||
}
|
||||
|
||||
|
|
|
@ -121,6 +121,9 @@ class Image {
|
|||
|
||||
int32_t GetSerial() const { return mSerial; }
|
||||
|
||||
bool IsDRM() const { return mIsDRM; }
|
||||
void SetIsDRM(bool aIsDRM) { mIsDRM = aIsDRM; }
|
||||
|
||||
virtual already_AddRefed<gfx::SourceSurface> GetAsSourceSurface() = 0;
|
||||
|
||||
virtual bool IsValid() const { return true; }
|
||||
|
@ -155,7 +158,10 @@ class Image {
|
|||
TextureClient* tcOverride = nullptr);
|
||||
|
||||
Image(void* aImplData, ImageFormat aFormat)
|
||||
: mImplData(aImplData), mSerial(++sSerialCounter), mFormat(aFormat) {}
|
||||
: mImplData(aImplData),
|
||||
mSerial(++sSerialCounter),
|
||||
mFormat(aFormat),
|
||||
mIsDRM(false) {}
|
||||
|
||||
// Protected destructor, to discourage deletion outside of Release():
|
||||
virtual ~Image() = default;
|
||||
|
@ -168,6 +174,7 @@ class Image {
|
|||
void* mImplData;
|
||||
int32_t mSerial;
|
||||
ImageFormat mFormat;
|
||||
bool mIsDRM;
|
||||
|
||||
static mozilla::Atomic<int32_t> sSerialCounter;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче