Bug 1597585 - Remove GLManager, which is now unused. r=mattwoodrow

Depends on D53772

Differential Revision: https://phabricator.services.mozilla.com/D53773

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-11-20 23:22:20 +00:00
parent df49f517a5
commit 32299e9f70
5 changed files with 0 additions and 117 deletions

View File

@ -306,7 +306,6 @@ if CONFIG['MOZ_WAYLAND']:
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
EXPORTS.mozilla.layers += [
'NativeLayerCA.h',
'opengl/GLManager.h',
'TextureSync.h',
]
EXPORTS += [
@ -315,7 +314,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
]
UNIFIED_SOURCES += [
'NativeLayerCA.mm',
'opengl/GLManager.cpp',
'TextureSync.cpp',
]
SOURCES += [

View File

@ -46,7 +46,6 @@ namespace layers {
class CompositingRenderTarget;
class CompositingRenderTargetOGL;
class DataTextureSource;
class GLManagerCompositor;
class ShaderProgramOGL;
class TextureSource;
class TextureSourceOGL;
@ -106,7 +105,6 @@ class PerUnitTexturePoolOGL : public CompositorTexturePoolOGL {
class CompositorOGL final : public Compositor {
typedef mozilla::gl::GLContext GLContext;
friend class GLManagerCompositor;
friend class CompositingRenderTargetOGL;
std::map<ShaderConfigOGL, ShaderProgramOGL*> mPrograms;

View File

@ -1,64 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "GLManager.h"
#include "CompositorOGL.h" // for CompositorOGL
#include "GLContext.h" // for GLContext
#include "OGLShaderProgram.h"
#include "mozilla/Attributes.h" // for override
#include "mozilla/RefPtr.h" // for RefPtr
#include "mozilla/layers/Compositor.h" // for Compositor
#include "mozilla/layers/LayerManagerComposite.h"
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/mozalloc.h" // for operator new, etc
using namespace mozilla::gl;
namespace mozilla {
namespace layers {
class GLManagerCompositor : public GLManager {
public:
explicit GLManagerCompositor(CompositorOGL* aCompositor)
: mImpl(aCompositor) {}
GLContext* gl() const override { return mImpl->gl(); }
void ActivateProgram(ShaderProgramOGL* aProg) override {
mImpl->ActivateProgram(aProg);
}
ShaderProgramOGL* GetProgram(GLenum aTarget,
gfx::SurfaceFormat aFormat) override {
ShaderConfigOGL config = ShaderConfigFromTargetAndFormat(aTarget, aFormat);
return mImpl->GetShaderProgramFor(config);
}
const gfx::Matrix4x4& GetProjMatrix() const override {
return mImpl->GetProjMatrix();
}
void BindAndDrawQuad(ShaderProgramOGL* aProg, const gfx::Rect& aLayerRect,
const gfx::Rect& aTextureRect) override {
mImpl->BindAndDrawQuad(aProg, aLayerRect, aTextureRect);
}
private:
RefPtr<CompositorOGL> mImpl;
};
/* static */
GLManager* GLManager::CreateGLManager(LayerManagerComposite* aManager) {
if (aManager && aManager->GetCompositor()->GetBackendType() ==
LayersBackend::LAYERS_OPENGL) {
return new GLManagerCompositor(
aManager->GetCompositor()->AsCompositorOGL());
}
return nullptr;
}
} // namespace layers
} // namespace mozilla

View File

@ -1,48 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef MOZILLA_GFX_GLMANAGER_H
#define MOZILLA_GFX_GLMANAGER_H
#include "GLDefs.h"
#include "mozilla/gfx/Types.h" // for SurfaceFormat
#include "mozilla/gfx/2D.h"
namespace mozilla {
namespace gl {
class GLContext;
} // namespace gl
namespace layers {
class LayerManagerComposite;
class ShaderProgramOGL;
/**
* Minimal interface to allow widgets to draw using OpenGL. Abstracts
* CompositorOGL. Call CreateGLManager with a LayerManagerComposite
* backed by a CompositorOGL.
*/
class GLManager {
public:
static GLManager* CreateGLManager(LayerManagerComposite* aManager);
virtual ~GLManager() = default;
virtual gl::GLContext* gl() const = 0;
virtual ShaderProgramOGL* GetProgram(GLenum aTarget,
gfx::SurfaceFormat aFormat) = 0;
virtual void ActivateProgram(ShaderProgramOGL* aPrg) = 0;
virtual const gfx::Matrix4x4& GetProjMatrix() const = 0;
virtual void BindAndDrawQuad(ShaderProgramOGL* aProg,
const gfx::Rect& aLayerRect,
const gfx::Rect& aTextureRect) = 0;
};
} // namespace layers
} // namespace mozilla
#endif

View File

@ -72,7 +72,6 @@
#include "mozilla/layers/IAPZCTreeManager.h"
#include "mozilla/layers/APZInputBridge.h"
#include "mozilla/layers/APZThreadUtils.h"
#include "mozilla/layers/GLManager.h"
#include "mozilla/layers/CompositorOGL.h"
#include "mozilla/layers/CompositorBridgeParent.h"
#include "mozilla/layers/BasicCompositor.h"