зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1764477
- Fix propagation of video bit depth changes to the output. r=aosmond
Previously, AsyncImagePipelineManager::UpdateImageKeys did not check bit depth when updating image keys, and WebRenderTextureHost did not correctly wrap GetColorDepth(). This caused the configuration not to correctly update. Differential Revision: https://phabricator.services.mozilla.com/D143558
This commit is contained in:
Родитель
a9aac08790
Коммит
987956876c
|
@ -251,13 +251,14 @@ Maybe<TextureHost::ResourceUpdateOp> AsyncImagePipelineManager::UpdateImageKeys(
|
|||
// If we already had a texture and the format hasn't changed, better to reuse
|
||||
// the image keys than create new ones.
|
||||
auto backend = aSceneBuilderTxn.GetBackendType();
|
||||
bool canUpdate = !!previousTexture &&
|
||||
previousTexture->GetSize() == texture->GetSize() &&
|
||||
previousTexture->GetFormat() == texture->GetFormat() &&
|
||||
previousTexture->NeedsYFlip() == texture->NeedsYFlip() &&
|
||||
previousTexture->SupportsExternalCompositing(backend) ==
|
||||
texture->SupportsExternalCompositing(backend) &&
|
||||
aPipeline->mKeys.Length() == numKeys;
|
||||
bool canUpdate =
|
||||
!!previousTexture && previousTexture->GetSize() == texture->GetSize() &&
|
||||
previousTexture->GetFormat() == texture->GetFormat() &&
|
||||
previousTexture->GetColorDepth() == texture->GetColorDepth() &&
|
||||
previousTexture->NeedsYFlip() == texture->NeedsYFlip() &&
|
||||
previousTexture->SupportsExternalCompositing(backend) ==
|
||||
texture->SupportsExternalCompositing(backend) &&
|
||||
aPipeline->mKeys.Length() == numKeys;
|
||||
|
||||
if (!canUpdate) {
|
||||
for (auto key : aPipeline->mKeys) {
|
||||
|
|
|
@ -79,6 +79,10 @@ already_AddRefed<gfx::DataSourceSurface> WebRenderTextureHost::GetAsSurface() {
|
|||
return mWrappedTextureHost->GetAsSurface();
|
||||
}
|
||||
|
||||
gfx::ColorDepth WebRenderTextureHost::GetColorDepth() const {
|
||||
return mWrappedTextureHost->GetColorDepth();
|
||||
}
|
||||
|
||||
gfx::YUVColorSpace WebRenderTextureHost::GetYUVColorSpace() const {
|
||||
return mWrappedTextureHost->GetYUVColorSpace();
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ class WebRenderTextureHost : public TextureHost {
|
|||
|
||||
already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override;
|
||||
|
||||
gfx::ColorDepth GetColorDepth() const override;
|
||||
gfx::YUVColorSpace GetYUVColorSpace() const override;
|
||||
gfx::ColorRange GetColorRange() const override;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче