Bug 1741111 - Remove LayersBackend::LAYERS_BASIC r=gfx-reviewers,bradwerth

LayersBackend::LAYERS_BASIC is not used any more.

Differential Revision: https://phabricator.services.mozilla.com/D131104
This commit is contained in:
sotaro 2021-11-17 22:05:47 +00:00
Родитель f0b08c0f2d
Коммит 4f3833aa2f
14 изменённых файлов: 9 добавлений и 34 удалений

Просмотреть файл

@ -575,7 +575,6 @@ bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
if (options.failIfMajorPerformanceCaveat) { if (options.failIfMajorPerformanceCaveat) {
const auto backend = GetCompositorBackendType(); const auto backend = GetCompositorBackendType();
bool isCompositorSlow = false; bool isCompositorSlow = false;
isCompositorSlow |= (backend == layers::LayersBackend::LAYERS_BASIC);
isCompositorSlow |= (backend == layers::LayersBackend::LAYERS_WR && isCompositorSlow |= (backend == layers::LayersBackend::LAYERS_WR &&
gfx::gfxVars::UseSoftwareWebRender()); gfx::gfxVars::UseSoftwareWebRender());

Просмотреть файл

@ -2844,7 +2844,7 @@ void BrowserChild::InitRenderingState(
// remote layer manager though, so that's fine. // remote layer manager though, so that's fine.
MOZ_ASSERT(!mPuppetWidget->HasLayerManager() || MOZ_ASSERT(!mPuppetWidget->HasLayerManager() ||
mPuppetWidget->GetWindowRenderer()->GetBackendType() == mPuppetWidget->GetWindowRenderer()->GetBackendType() ==
layers::LayersBackend::LAYERS_BASIC); layers::LayersBackend::LAYERS_NONE);
bool success = false; bool success = false;
if (mLayersConnected == Some(true)) { if (mLayersConnected == Some(true)) {
success = CreateRemoteLayerManager(compositorChild); success = CreateRemoteLayerManager(compositorChild);

Просмотреть файл

@ -81,8 +81,7 @@ static bool IsRemoteAcceleratedCompositor(
TextureFactoryIdentifier ident = TextureFactoryIdentifier ident =
aKnowsCompositor->GetTextureFactoryIdentifier(); aKnowsCompositor->GetTextureFactoryIdentifier();
return ident.mParentBackend != LayersBackend::LAYERS_BASIC && return !aKnowsCompositor->UsingSoftwareWebRender() &&
!aKnowsCompositor->UsingSoftwareWebRender() &&
ident.mParentProcessType == GeckoProcessType_GPU; ident.mParentProcessType == GeckoProcessType_GPU;
} }

Просмотреть файл

@ -106,8 +106,7 @@ bool ComputeHasIntermediateBuffer(gfx::SurfaceFormat aFormat,
return false; return false;
} }
return aLayersBackend != LayersBackend::LAYERS_BASIC || return aFormat == gfx::SurfaceFormat::UNKNOWN;
aFormat == gfx::SurfaceFormat::UNKNOWN;
} }
BufferTextureData* BufferTextureData::Create( BufferTextureData* BufferTextureData::Create(

Просмотреть файл

@ -91,7 +91,6 @@ TextureType TexTypeForWebgl(KnowsCompositor* const knowsCompositor) {
MOZ_CRASH("Unexpected LayersBackend::LAYERS_LAST"); MOZ_CRASH("Unexpected LayersBackend::LAYERS_LAST");
case LayersBackend::LAYERS_NONE: case LayersBackend::LAYERS_NONE:
case LayersBackend::LAYERS_BASIC:
return TextureType::Unknown; return TextureType::Unknown;
case LayersBackend::LAYERS_D3D11: case LayersBackend::LAYERS_D3D11:

Просмотреть файл

@ -46,8 +46,6 @@ const char* GetLayersBackendName(LayersBackend aBackend) {
return "webrender_software"; return "webrender_software";
} }
return "webrender"; return "webrender";
case LayersBackend::LAYERS_BASIC:
return "basic";
default: default:
MOZ_ASSERT_UNREACHABLE("unknown layers backend"); MOZ_ASSERT_UNREACHABLE("unknown layers backend");
return "unknown"; return "unknown";

Просмотреть файл

@ -167,7 +167,6 @@ enum class WindowKind : int8_t { MAIN = 0, SECONDARY, LAST };
enum class LayersBackend : int8_t { enum class LayersBackend : int8_t {
LAYERS_NONE = 0, LAYERS_NONE = 0,
LAYERS_BASIC,
LAYERS_OPENGL, LAYERS_OPENGL,
LAYERS_D3D11, LAYERS_D3D11,
LAYERS_WR, LAYERS_WR,

Просмотреть файл

@ -198,7 +198,7 @@ void FallbackRenderer::EndTransactionWithList(nsDisplayListBuilder* aBuilder,
DrawTarget* dt = mTarget->GetDrawTarget(); DrawTarget* dt = mTarget->GetDrawTarget();
BackendType backend = gfxPlatform::GetPlatform()->GetContentBackendFor( BackendType backend = gfxPlatform::GetPlatform()->GetContentBackendFor(
LayersBackend::LAYERS_BASIC); LayersBackend::LAYERS_NONE);
RefPtr<DrawTarget> dest = RefPtr<DrawTarget> dest =
gfxPlatform::GetPlatform()->CreateDrawTargetForBackend( gfxPlatform::GetPlatform()->CreateDrawTargetForBackend(
backend, dt->GetSize(), dt->GetFormat()); backend, dt->GetSize(), dt->GetFormat());

Просмотреть файл

@ -1358,8 +1358,7 @@ bool nsChildView::PaintWindowInDrawTarget(gfx::DrawTarget* aDT,
targetContext->Clip(); targetContext->Clip();
nsAutoRetainCocoaObject kungFuDeathGrip(mView); nsAutoRetainCocoaObject kungFuDeathGrip(mView);
if (GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_NONE || if (GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_NONE) {
GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_BASIC) {
nsBaseWidget::AutoLayerManagerSetup setupLayerManager(this, targetContext, nsBaseWidget::AutoLayerManagerSetup setupLayerManager(this, targetContext,
BufferMode::BUFFER_NONE); BufferMode::BUFFER_NONE);
return PaintWindow(aRegion); return PaintWindow(aRegion);
@ -1406,8 +1405,7 @@ void nsChildView::PaintWindowInContentLayer() {
void nsChildView::HandleMainThreadCATransaction() { void nsChildView::HandleMainThreadCATransaction() {
WillPaintWindow(); WillPaintWindow();
if (GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_NONE || if (GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_NONE) {
GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_BASIC) {
// We're in BasicLayers mode, i.e. main thread software compositing. // We're in BasicLayers mode, i.e. main thread software compositing.
// Composite the window into our layer's surface. // Composite the window into our layer's surface.
PaintWindowInContentLayer(); PaintWindowInContentLayer();

Просмотреть файл

@ -3646,8 +3646,7 @@ gboolean nsWindow::OnExposeEvent(cairo_t* cr) {
bool painted = false; bool painted = false;
{ {
if (renderer->GetBackendType() == LayersBackend::LAYERS_NONE || if (renderer->GetBackendType() == LayersBackend::LAYERS_NONE) {
renderer->GetBackendType() == LayersBackend::LAYERS_BASIC) {
if (GetTransparencyMode() == eTransparencyTransparent && if (GetTransparencyMode() == eTransparencyTransparent &&
layerBuffering == BufferMode::BUFFER_NONE && mHasAlphaVisual) { layerBuffering == BufferMode::BUFFER_NONE && mHasAlphaVisual) {
// If our draw target is unbuffered and we use an alpha channel, // If our draw target is unbuffered and we use an alpha channel,

Просмотреть файл

@ -347,12 +347,6 @@ class nsAutoRetainUIKitObject {
// nsAutoRetainCocoaObject kungFuDeathGrip(self); // nsAutoRetainCocoaObject kungFuDeathGrip(self);
bool painted = false; bool painted = false;
if (mGeckoChild->GetLayerManager()->GetBackendType() == LayersBackend::LAYERS_BASIC) {
nsBaseWidget::AutoLayerManagerSetup setupLayerManager(mGeckoChild, targetContext,
BufferMode::BUFFER_NONE);
painted = mGeckoChild->PaintWindow(region);
}
targetContext = nullptr; targetContext = nullptr;
targetSurface = nullptr; targetSurface = nullptr;

Просмотреть файл

@ -113,9 +113,6 @@ CompositorWidgetParent::EndBackBufferDrawing() {
} }
bool CompositorWidgetParent::InitCompositor(layers::Compositor* aCompositor) { bool CompositorWidgetParent::InitCompositor(layers::Compositor* aCompositor) {
if (aCompositor->GetBackendType() == layers::LayersBackend::LAYERS_BASIC) {
DeviceManagerDx::Get()->InitializeDirectDraw();
}
return true; return true;
} }

Просмотреть файл

@ -228,9 +228,6 @@ InProcessWinCompositorWidget::EndBackBufferDrawing() {
bool InProcessWinCompositorWidget::InitCompositor( bool InProcessWinCompositorWidget::InitCompositor(
layers::Compositor* aCompositor) { layers::Compositor* aCompositor) {
if (aCompositor->GetBackendType() == layers::LayersBackend::LAYERS_BASIC) {
DeviceManagerDx::Get()->InitializeDirectDraw();
}
return true; return true;
} }

Просмотреть файл

@ -197,9 +197,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) {
mLastPaintBounds = mBounds; mLastPaintBounds = mBounds;
#ifdef MOZ_XUL #ifdef MOZ_XUL
if (!aDC && if (!aDC && (renderer->GetBackendType() == LayersBackend::LAYERS_NONE) &&
(renderer->GetBackendType() == LayersBackend::LAYERS_NONE ||
renderer->GetBackendType() == LayersBackend::LAYERS_BASIC) &&
(eTransparencyTransparent == mTransparencyMode)) { (eTransparencyTransparent == mTransparencyMode)) {
// For layered translucent windows all drawing should go to memory DC and no // For layered translucent windows all drawing should go to memory DC and no
// WM_PAINT messages are normally generated. To support asynchronous // WM_PAINT messages are normally generated. To support asynchronous
@ -273,8 +271,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) {
#endif // WIDGET_DEBUG_OUTPUT #endif // WIDGET_DEBUG_OUTPUT
switch (renderer->GetBackendType()) { switch (renderer->GetBackendType()) {
case LayersBackend::LAYERS_NONE: case LayersBackend::LAYERS_NONE: {
case LayersBackend::LAYERS_BASIC: {
RefPtr<gfxASurface> targetSurface; RefPtr<gfxASurface> targetSurface;
#if defined(MOZ_XUL) #if defined(MOZ_XUL)