From 069a9b5451252264a163fc3717ecd36ed3733b0a Mon Sep 17 00:00:00 2001 From: Brad Werth Date: Thu, 8 Apr 2021 16:42:06 +0000 Subject: [PATCH] Bug 1685183 Part 2: Remove scale factor from SurfaceDescriptorMacIOSurface. r=jgilbert Differential Revision: https://phabricator.services.mozilla.com/D101227 --- gfx/gl/SharedSurfaceIO.cpp | 3 +-- gfx/layers/ipc/LayersSurfaces.ipdlh | 1 - gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp | 12 ++++++------ gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp | 6 +++--- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/gfx/gl/SharedSurfaceIO.cpp b/gfx/gl/SharedSurfaceIO.cpp index 00567e2b3aec..d1ab389f7360 100644 --- a/gfx/gl/SharedSurfaceIO.cpp +++ b/gfx/gl/SharedSurfaceIO.cpp @@ -92,8 +92,7 @@ Maybe 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 diff --git a/gfx/layers/ipc/LayersSurfaces.ipdlh b/gfx/layers/ipc/LayersSurfaces.ipdlh index e95afae5e2dc..7e59365c8f95 100644 --- a/gfx/layers/ipc/LayersSurfaces.ipdlh +++ b/gfx/layers/ipc/LayersSurfaces.ipdlh @@ -56,7 +56,6 @@ namespace layers { [Comparable] struct SurfaceDescriptorMacIOSurface { uint32_t surfaceId; - double scaleFactor; bool isOpaque; YUVColorSpace yUVColorSpace; }; diff --git a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp index 4b98c54def51..026814d02b93 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp +++ b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp @@ -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 { diff --git a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp index 9690e10db10b..65c43c135172 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp +++ b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp @@ -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"; }