Skip to content

Commit

Permalink
Bug 1741775 - Remove LayersBackend::LAYERS_OPENGL r=gfx-reviewers,nical
Browse files Browse the repository at this point in the history
LayersBackend::LAYERS_OPENGL is not used any more.

Code under widget/uikit is dead code.

Differential Revision: https://phabricator.services.mozilla.com/D131461
  • Loading branch information
sotaro committed Nov 20, 2021
1 parent c78486c commit 74b9eb2
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
1 change: 0 additions & 1 deletion gfx/layers/CanvasRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions gfx/layers/LayersTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
7 changes: 1 addition & 6 deletions gfx/layers/LayersTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

Expand Down
5 changes: 2 additions & 3 deletions gfx/layers/client/TextureClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions widget/uikit/nsWindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ - (void)setNeedsDisplayInRect:(CGRect)aRect {
- (BOOL)isUsingMainThreadOpenGL {
if (!mGeckoChild || ![self window]) return NO;

return mGeckoChild->GetLayerManager(nullptr)->GetBackendType() ==
mozilla::layers::LayersBackend::LAYERS_OPENGL;
return NO;
}

- (void)drawUsingOpenGL {
Expand Down

0 comments on commit 74b9eb2

Please sign in to comment.