Bug 1741775 - Remove LayersBackend::LAYERS_OPENGL r=gfx-reviewers,nical

LayersBackend::LAYERS_OPENGL is not used any more.

Code under widget/uikit is dead code.

Differential Revision: https://phabricator.services.mozilla.com/D131461
This commit is contained in:
sotaro 2021-11-20 22:52:14 +00:00
parent 3d94f040d6
commit 01cd151a04
5 changed files with 4 additions and 14 deletions

View File

@ -93,7 +93,6 @@ TextureType TexTypeForWebgl(KnowsCompositor* const knowsCompositor) {
case LayersBackend::LAYERS_NONE:
return TextureType::Unknown;
case LayersBackend::LAYERS_OPENGL:
case LayersBackend::LAYERS_WR:
break;
}

View File

@ -30,8 +30,6 @@ const char* GetLayersBackendName(LayersBackend aBackend) {
switch (aBackend) {
case LayersBackend::LAYERS_NONE:
return "none";
case LayersBackend::LAYERS_OPENGL:
return "opengl";
case LayersBackend::LAYERS_WR:
MOZ_ASSERT(gfx::gfxVars::UseWebRender());
if (gfx::gfxVars::UseSoftwareWebRender()) {

View File

@ -165,12 +165,7 @@ typedef BaseTransactionId<CompositionOpportunityType> CompositionOpportunityId;
/// content in the window.
enum class WindowKind : int8_t { MAIN = 0, SECONDARY, LAST };
enum class LayersBackend : int8_t {
LAYERS_NONE = 0,
LAYERS_OPENGL,
LAYERS_WR,
LAYERS_LAST
};
enum class LayersBackend : int8_t { LAYERS_NONE = 0, LAYERS_WR, LAYERS_LAST };
enum class WebRenderBackend : int8_t { HARDWARE = 0, SOFTWARE, LAST };

View File

@ -275,9 +275,8 @@ static TextureType GetTextureType(gfx::SurfaceFormat aFormat,
#endif
#ifdef MOZ_WAYLAND
if ((layersBackend == LayersBackend::LAYERS_OPENGL ||
(layersBackend == LayersBackend::LAYERS_WR &&
!aKnowsCompositor->UsingSoftwareWebRender())) &&
if ((layersBackend == LayersBackend::LAYERS_WR &&
!aKnowsCompositor->UsingSoftwareWebRender()) &&
widget::GetDMABufDevice()->IsDMABufTexturesEnabled() &&
aFormat != SurfaceFormat::A8) {
return TextureType::DMABUF;

View File

@ -239,8 +239,7 @@ class nsAutoRetainUIKitObject {
- (BOOL)isUsingMainThreadOpenGL {
if (!mGeckoChild || ![self window]) return NO;
return mGeckoChild->GetLayerManager(nullptr)->GetBackendType() ==
mozilla::layers::LayersBackend::LAYERS_OPENGL;
return NO;
}
- (void)drawUsingOpenGL {