mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
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:
parent
f0b08c0f2d
commit
4f3833aa2f
@ -575,7 +575,6 @@ bool ClientWebGLContext::CreateHostContext(const uvec2& requestedSize) {
|
||||
if (options.failIfMajorPerformanceCaveat) {
|
||||
const auto backend = GetCompositorBackendType();
|
||||
bool isCompositorSlow = false;
|
||||
isCompositorSlow |= (backend == layers::LayersBackend::LAYERS_BASIC);
|
||||
isCompositorSlow |= (backend == layers::LayersBackend::LAYERS_WR &&
|
||||
gfx::gfxVars::UseSoftwareWebRender());
|
||||
|
||||
|
@ -2844,7 +2844,7 @@ void BrowserChild::InitRenderingState(
|
||||
// remote layer manager though, so that's fine.
|
||||
MOZ_ASSERT(!mPuppetWidget->HasLayerManager() ||
|
||||
mPuppetWidget->GetWindowRenderer()->GetBackendType() ==
|
||||
layers::LayersBackend::LAYERS_BASIC);
|
||||
layers::LayersBackend::LAYERS_NONE);
|
||||
bool success = false;
|
||||
if (mLayersConnected == Some(true)) {
|
||||
success = CreateRemoteLayerManager(compositorChild);
|
||||
|
@ -81,8 +81,7 @@ static bool IsRemoteAcceleratedCompositor(
|
||||
|
||||
TextureFactoryIdentifier ident =
|
||||
aKnowsCompositor->GetTextureFactoryIdentifier();
|
||||
return ident.mParentBackend != LayersBackend::LAYERS_BASIC &&
|
||||
!aKnowsCompositor->UsingSoftwareWebRender() &&
|
||||
return !aKnowsCompositor->UsingSoftwareWebRender() &&
|
||||
ident.mParentProcessType == GeckoProcessType_GPU;
|
||||
}
|
||||
|
||||
|
@ -106,8 +106,7 @@ bool ComputeHasIntermediateBuffer(gfx::SurfaceFormat aFormat,
|
||||
return false;
|
||||
}
|
||||
|
||||
return aLayersBackend != LayersBackend::LAYERS_BASIC ||
|
||||
aFormat == gfx::SurfaceFormat::UNKNOWN;
|
||||
return aFormat == gfx::SurfaceFormat::UNKNOWN;
|
||||
}
|
||||
|
||||
BufferTextureData* BufferTextureData::Create(
|
||||
|
@ -91,7 +91,6 @@ TextureType TexTypeForWebgl(KnowsCompositor* const knowsCompositor) {
|
||||
MOZ_CRASH("Unexpected LayersBackend::LAYERS_LAST");
|
||||
|
||||
case LayersBackend::LAYERS_NONE:
|
||||
case LayersBackend::LAYERS_BASIC:
|
||||
return TextureType::Unknown;
|
||||
|
||||
case LayersBackend::LAYERS_D3D11:
|
||||
|
@ -46,8 +46,6 @@ const char* GetLayersBackendName(LayersBackend aBackend) {
|
||||
return "webrender_software";
|
||||
}
|
||||
return "webrender";
|
||||
case LayersBackend::LAYERS_BASIC:
|
||||
return "basic";
|
||||
default:
|
||||
MOZ_ASSERT_UNREACHABLE("unknown layers backend");
|
||||
return "unknown";
|
||||
|
@ -167,7 +167,6 @@ enum class WindowKind : int8_t { MAIN = 0, SECONDARY, LAST };
|
||||
|
||||
enum class LayersBackend : int8_t {
|
||||
LAYERS_NONE = 0,
|
||||
LAYERS_BASIC,
|
||||
LAYERS_OPENGL,
|
||||
LAYERS_D3D11,
|
||||
LAYERS_WR,
|
||||
|
@ -198,7 +198,7 @@ void FallbackRenderer::EndTransactionWithList(nsDisplayListBuilder* aBuilder,
|
||||
DrawTarget* dt = mTarget->GetDrawTarget();
|
||||
|
||||
BackendType backend = gfxPlatform::GetPlatform()->GetContentBackendFor(
|
||||
LayersBackend::LAYERS_BASIC);
|
||||
LayersBackend::LAYERS_NONE);
|
||||
RefPtr<DrawTarget> dest =
|
||||
gfxPlatform::GetPlatform()->CreateDrawTargetForBackend(
|
||||
backend, dt->GetSize(), dt->GetFormat());
|
||||
|
@ -1358,8 +1358,7 @@ bool nsChildView::PaintWindowInDrawTarget(gfx::DrawTarget* aDT,
|
||||
targetContext->Clip();
|
||||
|
||||
nsAutoRetainCocoaObject kungFuDeathGrip(mView);
|
||||
if (GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_NONE ||
|
||||
GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_BASIC) {
|
||||
if (GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_NONE) {
|
||||
nsBaseWidget::AutoLayerManagerSetup setupLayerManager(this, targetContext,
|
||||
BufferMode::BUFFER_NONE);
|
||||
return PaintWindow(aRegion);
|
||||
@ -1406,8 +1405,7 @@ void nsChildView::PaintWindowInContentLayer() {
|
||||
void nsChildView::HandleMainThreadCATransaction() {
|
||||
WillPaintWindow();
|
||||
|
||||
if (GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_NONE ||
|
||||
GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_BASIC) {
|
||||
if (GetWindowRenderer()->GetBackendType() == LayersBackend::LAYERS_NONE) {
|
||||
// We're in BasicLayers mode, i.e. main thread software compositing.
|
||||
// Composite the window into our layer's surface.
|
||||
PaintWindowInContentLayer();
|
||||
|
@ -3646,8 +3646,7 @@ gboolean nsWindow::OnExposeEvent(cairo_t* cr) {
|
||||
|
||||
bool painted = false;
|
||||
{
|
||||
if (renderer->GetBackendType() == LayersBackend::LAYERS_NONE ||
|
||||
renderer->GetBackendType() == LayersBackend::LAYERS_BASIC) {
|
||||
if (renderer->GetBackendType() == LayersBackend::LAYERS_NONE) {
|
||||
if (GetTransparencyMode() == eTransparencyTransparent &&
|
||||
layerBuffering == BufferMode::BUFFER_NONE && mHasAlphaVisual) {
|
||||
// If our draw target is unbuffered and we use an alpha channel,
|
||||
|
@ -347,12 +347,6 @@ class nsAutoRetainUIKitObject {
|
||||
|
||||
// nsAutoRetainCocoaObject kungFuDeathGrip(self);
|
||||
bool painted = false;
|
||||
if (mGeckoChild->GetLayerManager()->GetBackendType() == LayersBackend::LAYERS_BASIC) {
|
||||
nsBaseWidget::AutoLayerManagerSetup setupLayerManager(mGeckoChild, targetContext,
|
||||
BufferMode::BUFFER_NONE);
|
||||
painted = mGeckoChild->PaintWindow(region);
|
||||
}
|
||||
|
||||
targetContext = nullptr;
|
||||
targetSurface = nullptr;
|
||||
|
||||
|
@ -113,9 +113,6 @@ CompositorWidgetParent::EndBackBufferDrawing() {
|
||||
}
|
||||
|
||||
bool CompositorWidgetParent::InitCompositor(layers::Compositor* aCompositor) {
|
||||
if (aCompositor->GetBackendType() == layers::LayersBackend::LAYERS_BASIC) {
|
||||
DeviceManagerDx::Get()->InitializeDirectDraw();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -228,9 +228,6 @@ InProcessWinCompositorWidget::EndBackBufferDrawing() {
|
||||
|
||||
bool InProcessWinCompositorWidget::InitCompositor(
|
||||
layers::Compositor* aCompositor) {
|
||||
if (aCompositor->GetBackendType() == layers::LayersBackend::LAYERS_BASIC) {
|
||||
DeviceManagerDx::Get()->InitializeDirectDraw();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -197,9 +197,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel) {
|
||||
mLastPaintBounds = mBounds;
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
if (!aDC &&
|
||||
(renderer->GetBackendType() == LayersBackend::LAYERS_NONE ||
|
||||
renderer->GetBackendType() == LayersBackend::LAYERS_BASIC) &&
|
||||
if (!aDC && (renderer->GetBackendType() == LayersBackend::LAYERS_NONE) &&
|
||||
(eTransparencyTransparent == mTransparencyMode)) {
|
||||
// For layered translucent windows all drawing should go to memory DC and no
|
||||
// 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
|
||||
|
||||
switch (renderer->GetBackendType()) {
|
||||
case LayersBackend::LAYERS_NONE:
|
||||
case LayersBackend::LAYERS_BASIC: {
|
||||
case LayersBackend::LAYERS_NONE: {
|
||||
RefPtr<gfxASurface> targetSurface;
|
||||
|
||||
#if defined(MOZ_XUL)
|
||||
|
Loading…
Reference in New Issue
Block a user