зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1668840 - P2. Fix GPUVideoTextureHost and renable recycle allocator with OGL. r=mattwoodrow
call unbindTextureSource and NotifyNotUsed on wrapped texture. Differential Revision: https://phabricator.services.mozilla.com/D92707
This commit is contained in:
Родитель
10c246bc45
Коммит
bdebf533e7
|
@ -427,16 +427,7 @@ void ImageContainer::EnsureRecycleAllocatorForRDD(
|
|||
return;
|
||||
}
|
||||
|
||||
bool useRecycleAllocator =
|
||||
StaticPrefs::layers_recycle_allocator_rdd_AtStartup();
|
||||
#ifdef XP_MACOSX
|
||||
// Disable RecycleAllocator for RDD on MacOS without WebRender.
|
||||
// Recycling caused rendering artifact on a MacOS PC with OpenGL compositor.
|
||||
if (!gfxVars::UseWebRender()) {
|
||||
useRecycleAllocator = false;
|
||||
}
|
||||
#endif
|
||||
if (!useRecycleAllocator) {
|
||||
if (!StaticPrefs::layers_recycle_allocator_rdd_AtStartup()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -257,5 +257,20 @@ void GPUVideoTextureHost::PushDisplayItems(
|
|||
aBuilder, aBounds, aClip, aFilter, aImageKeys, aPreferCompositorSurface);
|
||||
}
|
||||
|
||||
void GPUVideoTextureHost::UnbindTextureSource() {
|
||||
if (EnsureWrappedTextureHost()) {
|
||||
EnsureWrappedTextureHost()->UnbindTextureSource();
|
||||
}
|
||||
// Handle read unlock
|
||||
TextureHost::UnbindTextureSource();
|
||||
}
|
||||
|
||||
void GPUVideoTextureHost::NotifyNotUsed() {
|
||||
if (EnsureWrappedTextureHost()) {
|
||||
EnsureWrappedTextureHost()->NotifyNotUsed();
|
||||
}
|
||||
TextureHost::NotifyNotUsed();
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -70,6 +70,9 @@ class GPUVideoTextureHost : public TextureHost {
|
|||
const Range<wr::ImageKey>& aImageKeys,
|
||||
const bool aPreferCompositorSurface) override;
|
||||
|
||||
void UnbindTextureSource() override;
|
||||
void NotifyNotUsed() override;
|
||||
|
||||
protected:
|
||||
GPUVideoTextureHost(TextureFlags aFlags,
|
||||
const SurfaceDescriptorGPUVideo& aDescriptor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче