mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1777264 Part 3: Make MacIOSurfaceImage report color depth accurately. r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D153283
This commit is contained in:
parent
8d95a0c511
commit
ed3a0d7167
@ -30,6 +30,13 @@ TextureClient* MacIOSurfaceImage::GetTextureClient(
|
||||
return mTextureClient;
|
||||
}
|
||||
|
||||
ColorDepth MacIOSurfaceImage::GetColorDepth() const {
|
||||
if (!mSurface) {
|
||||
return gfx::ColorDepth::COLOR_8;
|
||||
}
|
||||
return mSurface->GetColorDepth();
|
||||
}
|
||||
|
||||
already_AddRefed<SourceSurface> MacIOSurfaceImage::GetAsSourceSurface() {
|
||||
return CreateSourceSurfaceFromMacIOSurface(mSurface);
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ class MacIOSurfaceImage : public Image {
|
||||
|
||||
gfx::IntRect GetPictureRect() const override { return mPictureRect; }
|
||||
|
||||
gfx::ColorDepth GetColorDepth() const override;
|
||||
|
||||
private:
|
||||
RefPtr<MacIOSurface> mSurface;
|
||||
RefPtr<TextureClient> mTextureClient;
|
||||
|
Loading…
Reference in New Issue
Block a user