Bug 1636868 - Add RenderTextureHostWrapper for GPUVideoTextureHost r=jrmuizel

By using RenderTextureHostWrapper, we could reduce re-creation of RenderDXGITextureHostOGL and RenderDXGIYCbCrTextureHostOGL.

Differential Revision: https://phabricator.services.mozilla.com/D74838
This commit is contained in:
sotaro
2020-05-22 19:42:38 +00:00
parent ec678a3c8b
commit 41303dc6db
9 changed files with 154 additions and 9 deletions

View File

@@ -61,6 +61,18 @@ void AsyncImagePipelineManager::Destroy() {
mDestroyed = true;
}
/* static */
wr::ExternalImageId AsyncImagePipelineManager::GetNextExternalImageId() {
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
static uint64_t sResourceId = 0;
++sResourceId;
// Upper 32bit(namespace) needs to be 0.
// Namespace other than 0 might be used by others.
MOZ_RELEASE_ASSERT(sResourceId != UINT32_MAX);
return wr::ToExternalImageId(sResourceId);
}
void AsyncImagePipelineManager::SetWillGenerateFrame() {
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());