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:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user