Bug 1543359 - P10. Add color range info to GPU and WR texture host. r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D27243
This commit is contained in:
Jean-Yves Avenard
2019-07-26 06:14:09 +00:00
parent 97b6db1bb5
commit 0695488e13
4 changed files with 16 additions and 0 deletions

View File

@@ -85,6 +85,13 @@ gfx::YUVColorSpace GPUVideoTextureHost::GetYUVColorSpace() const {
return gfx::YUVColorSpace::UNKNOWN;
}
gfx::ColorRange GPUVideoTextureHost::GetColorRange() const {
if (mWrappedTextureHost) {
return mWrappedTextureHost->GetColorRange();
}
return TextureHost::GetColorRange();
}
gfx::IntSize GPUVideoTextureHost::GetSize() const {
if (!mWrappedTextureHost) {
return gfx::IntSize();

View File

@@ -38,6 +38,7 @@ class GPUVideoTextureHost : public TextureHost {
}
gfx::YUVColorSpace GetYUVColorSpace() const override;
gfx::ColorRange GetColorRange() const override;
gfx::IntSize GetSize() const override;

View File

@@ -142,6 +142,13 @@ gfx::YUVColorSpace WebRenderTextureHost::GetYUVColorSpace() const {
return gfx::YUVColorSpace::UNKNOWN;
}
gfx::ColorRange WebRenderTextureHost::GetColorRange() const {
if (mWrappedTextureHost) {
return mWrappedTextureHost->GetColorRange();
}
return TextureHost::GetColorRange();
}
gfx::IntSize WebRenderTextureHost::GetSize() const {
if (!mWrappedTextureHost) {
return gfx::IntSize();

View File

@@ -52,6 +52,7 @@ class WebRenderTextureHost : public TextureHost {
already_AddRefed<gfx::DataSourceSurface> GetAsSurface() override;
gfx::YUVColorSpace GetYUVColorSpace() const override;
gfx::ColorRange GetColorRange() const override;
gfx::IntSize GetSize() const override;