Bug 1685183 Part 2: Remove scale factor from SurfaceDescriptorMacIOSurface. r=jgilbert

Differential Revision: https://phabricator.services.mozilla.com/D101227
This commit is contained in:
Brad Werth 2021-04-08 16:42:06 +00:00
parent e4fe1123e7
commit 069a9b5451
4 changed files with 10 additions and 12 deletions

View File

@ -92,8 +92,7 @@ Maybe<layers::SurfaceDescriptor>
SharedSurface_IOSurface::ToSurfaceDescriptor() {
const bool isOpaque = false; // RGBA
return Some(layers::SurfaceDescriptorMacIOSurface(
mIOSurf->GetIOSurfaceID(), mIOSurf->GetContentsScaleFactor(), isOpaque,
mIOSurf->GetYUVColorSpace()));
mIOSurf->GetIOSurfaceID(), isOpaque, mIOSurf->GetYUVColorSpace()));
}
} // namespace gl

View File

@ -56,7 +56,6 @@ namespace layers {
[Comparable] struct SurfaceDescriptorMacIOSurface {
uint32_t surfaceId;
double scaleFactor;
bool isOpaque;
YUVColorSpace yUVColorSpace;
};

View File

@ -50,17 +50,17 @@ MacIOSurfaceTextureData* MacIOSurfaceTextureData::Create(const IntSize& aSize,
}
bool MacIOSurfaceTextureData::Serialize(SurfaceDescriptor& aOutDescriptor) {
aOutDescriptor = SurfaceDescriptorMacIOSurface(
mSurface->GetIOSurfaceID(), mSurface->GetContentsScaleFactor(),
!mSurface->HasAlpha(), mSurface->GetYUVColorSpace());
aOutDescriptor = SurfaceDescriptorMacIOSurface(mSurface->GetIOSurfaceID(),
!mSurface->HasAlpha(),
mSurface->GetYUVColorSpace());
return true;
}
void MacIOSurfaceTextureData::GetSubDescriptor(
RemoteDecoderVideoSubDescriptor* const aOutDesc) {
*aOutDesc = SurfaceDescriptorMacIOSurface(
mSurface->GetIOSurfaceID(), mSurface->GetContentsScaleFactor(),
!mSurface->HasAlpha(), mSurface->GetYUVColorSpace());
*aOutDesc = SurfaceDescriptorMacIOSurface(mSurface->GetIOSurfaceID(),
!mSurface->HasAlpha(),
mSurface->GetYUVColorSpace());
}
void MacIOSurfaceTextureData::FillInfo(TextureData::Info& aInfo) const {

View File

@ -19,9 +19,9 @@ MacIOSurfaceTextureHostOGL::MacIOSurfaceTextureHostOGL(
TextureFlags aFlags, const SurfaceDescriptorMacIOSurface& aDescriptor)
: TextureHost(aFlags) {
MOZ_COUNT_CTOR(MacIOSurfaceTextureHostOGL);
mSurface = MacIOSurface::LookupSurface(
aDescriptor.surfaceId(), aDescriptor.scaleFactor(),
!aDescriptor.isOpaque(), aDescriptor.yUVColorSpace());
mSurface = MacIOSurface::LookupSurface(aDescriptor.surfaceId(),
!aDescriptor.isOpaque(),
aDescriptor.yUVColorSpace());
if (!mSurface) {
gfxCriticalNote << "Failed to look up MacIOSurface";
}