diff options
author | Moonchild <moonchild@palemoon.org> | 2020-12-27 06:58:56 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-12-27 06:58:56 +0000 |
commit | 8d4456c797eea9236f4d84cdb23d85ce670152dc (patch) | |
tree | 5328170540665a789e1d857957e433f253849f8b /gfx/layers/opengl/TextureClientOGL.cpp | |
parent | ae2a160348562dfa5361f1e68226365b240c9597 (diff) | |
download | UXP-8d4456c797eea9236f4d84cdb23d85ce670152dc.tar UXP-8d4456c797eea9236f4d84cdb23d85ce670152dc.tar.gz UXP-8d4456c797eea9236f4d84cdb23d85ce670152dc.tar.lz UXP-8d4456c797eea9236f4d84cdb23d85ce670152dc.tar.xz UXP-8d4456c797eea9236f4d84cdb23d85ce670152dc.zip |
Issue #1053 - Part 3a: Remove Android conditionals from /gfx
Diffstat (limited to 'gfx/layers/opengl/TextureClientOGL.cpp')
-rw-r--r-- | gfx/layers/opengl/TextureClientOGL.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/gfx/layers/opengl/TextureClientOGL.cpp b/gfx/layers/opengl/TextureClientOGL.cpp index 78d4e6d9c..1e337717b 100644 --- a/gfx/layers/opengl/TextureClientOGL.cpp +++ b/gfx/layers/opengl/TextureClientOGL.cpp @@ -73,64 +73,5 @@ EGLImageTextureData::Serialize(SurfaceDescriptor& aOutDescriptor) return true; } -//////////////////////////////////////////////////////////////////////// -// AndroidSurface - -#ifdef MOZ_WIDGET_ANDROID - -already_AddRefed<TextureClient> -AndroidSurfaceTextureData::CreateTextureClient(AndroidSurfaceTexture* aSurfTex, - gfx::IntSize aSize, - gl::OriginPos aOriginPos, - LayersIPCChannel* aAllocator, - TextureFlags aFlags) -{ - MOZ_ASSERT(XRE_IsParentProcess(), - "Can't pass an android surfaces between processes."); - - if (!aSurfTex || !XRE_IsParentProcess()) { - return nullptr; - } - - if (aOriginPos == gl::OriginPos::BottomLeft) { - aFlags |= TextureFlags::ORIGIN_BOTTOM_LEFT; - } - - return TextureClient::CreateWithData( - new AndroidSurfaceTextureData(aSurfTex, aSize), - aFlags, aAllocator - ); -} - -AndroidSurfaceTextureData::AndroidSurfaceTextureData(AndroidSurfaceTexture* aSurfTex, - gfx::IntSize aSize) - : mSurfTex(aSurfTex) - , mSize(aSize) -{} - -AndroidSurfaceTextureData::~AndroidSurfaceTextureData() -{} - -void -AndroidSurfaceTextureData::FillInfo(TextureData::Info& aInfo) const -{ - aInfo.size = mSize; - aInfo.format = gfx::SurfaceFormat::UNKNOWN; - aInfo.hasIntermediateBuffer = false; - aInfo.hasSynchronization = false; - aInfo.supportsMoz2D = false; - aInfo.canExposeMappedData = false; -} - -bool -AndroidSurfaceTextureData::Serialize(SurfaceDescriptor& aOutDescriptor) -{ - aOutDescriptor = SurfaceTextureDescriptor((uintptr_t)mSurfTex.get(), - mSize); - return true; -} - -#endif // MOZ_WIDGET_ANDROID - } // namespace layers } // namespace mozilla |