зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1622709 - Re-enable RecycleAllocator at ImageContainer for RDD process r=nical
GPUVideoTextureHost needs call wrapped TextureHost's PrepareTextureSource() and UpdatedInternal() for layer compositor. Differential Revision: https://phabricator.services.mozilla.com/D66923 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
510af72a67
Коммит
979e03c00a
|
@ -265,6 +265,10 @@ RemoteVideoDecoderParent::RemoteVideoDecoderParent(
|
|||
}
|
||||
|
||||
RefPtr<layers::ImageContainer> container = new layers::ImageContainer();
|
||||
if (mKnowsCompositor && XRE_IsRDDProcess()) {
|
||||
// Ensure to allocate recycle allocator
|
||||
container->EnsureRecycleAllocatorForRDD(mKnowsCompositor);
|
||||
}
|
||||
|
||||
CreateDecoderParams params(mVideoInfo);
|
||||
params.mTaskQueue = mDecodeTaskQueue;
|
||||
|
|
|
@ -62,6 +62,14 @@ void GPUVideoTextureHost::Unlock() {
|
|||
EnsureWrappedTextureHost()->Unlock();
|
||||
}
|
||||
|
||||
void GPUVideoTextureHost::PrepareTextureSource(
|
||||
CompositableTextureSourceRef& aTexture) {
|
||||
if (!EnsureWrappedTextureHost()) {
|
||||
return;
|
||||
}
|
||||
EnsureWrappedTextureHost()->PrepareTextureSource(aTexture);
|
||||
}
|
||||
|
||||
bool GPUVideoTextureHost::BindTextureSource(
|
||||
CompositableTextureSourceRef& aTexture) {
|
||||
if (!EnsureWrappedTextureHost()) {
|
||||
|
@ -122,6 +130,13 @@ bool GPUVideoTextureHost::HasIntermediateBuffer() const {
|
|||
return mWrappedTextureHost->HasIntermediateBuffer();
|
||||
}
|
||||
|
||||
void GPUVideoTextureHost::UpdatedInternal(const nsIntRegion* Region) {
|
||||
if (!EnsureWrappedTextureHost()) {
|
||||
return;
|
||||
}
|
||||
EnsureWrappedTextureHost()->UpdatedInternal(Region);
|
||||
}
|
||||
|
||||
void GPUVideoTextureHost::CreateRenderTexture(
|
||||
const wr::ExternalImageId& aExternalImageId) {
|
||||
MOZ_ASSERT(mExternalImageId.isNothing());
|
||||
|
|
|
@ -30,6 +30,8 @@ class GPUVideoTextureHost : public TextureHost {
|
|||
|
||||
gfx::SurfaceFormat GetFormat() const override;
|
||||
|
||||
void PrepareTextureSource(CompositableTextureSourceRef& aTexture) override;
|
||||
|
||||
bool BindTextureSource(CompositableTextureSourceRef& aTexture) override;
|
||||
bool AcquireTextureSource(CompositableTextureSourceRef& aTexture) override;
|
||||
|
||||
|
@ -70,6 +72,8 @@ class GPUVideoTextureHost : public TextureHost {
|
|||
|
||||
TextureHost* EnsureWrappedTextureHost();
|
||||
|
||||
void UpdatedInternal(const nsIntRegion* Region) override;
|
||||
|
||||
RefPtr<TextureHost> mWrappedTextureHost;
|
||||
SurfaceDescriptorGPUVideo mDescriptor;
|
||||
wr::MaybeExternalImageId mExternalImageId;
|
||||
|
|
|
@ -720,6 +720,7 @@ class TextureHost : public AtomicRefCountedWithFinalize<TextureHost> {
|
|||
friend class TextureParent;
|
||||
friend class TiledLayerBufferComposite;
|
||||
friend class TextureSourceProvider;
|
||||
friend class GPUVideoTextureHost;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче