forked from mirrors/gecko-dev
Bug 1576390 - Remove now-unused DrawWindowOverlay and WindowOverlayChanged methods. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D52748 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8b245c092f
commit
d3a4eb5918
12 changed files with 2 additions and 61 deletions
|
|
@ -116,7 +116,6 @@ HostLayerManager::HostLayerManager()
|
|||
: mDebugOverlayWantsNextFrame(false),
|
||||
mWarningLevel(0.0f),
|
||||
mCompositorBridgeID(0),
|
||||
mWindowOverlayChanged(false),
|
||||
mLastPaintTime(TimeDuration::Forever()),
|
||||
mRenderStartTime(TimeStamp::Now()) {}
|
||||
|
||||
|
|
@ -618,7 +617,7 @@ void LayerManagerComposite::UpdateAndRender() {
|
|||
invalid = mInvalidRegion;
|
||||
}
|
||||
|
||||
if (invalid.IsEmpty() && !mWindowOverlayChanged) {
|
||||
if (invalid.IsEmpty()) {
|
||||
// Composition requested, but nothing has changed. Don't do any work.
|
||||
mClonedLayerTreeProperties = LayerProperties::CloneFrom(GetRoot());
|
||||
mProfilerScreenshotGrabber.NotifyEmptyFrame();
|
||||
|
|
@ -646,7 +645,6 @@ void LayerManagerComposite::UpdateAndRender() {
|
|||
|
||||
if (!mTarget && rendered) {
|
||||
mInvalidRegion.SetEmpty();
|
||||
mWindowOverlayChanged = false;
|
||||
}
|
||||
|
||||
// Update cached layer tree information.
|
||||
|
|
@ -1274,10 +1272,6 @@ bool LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion,
|
|||
if (usingNativeLayers) {
|
||||
UpdateDebugOverlayNativeLayers();
|
||||
} else {
|
||||
// Allow widget to render a custom foreground.
|
||||
mCompositor->GetWidget()->DrawWindowOverlay(
|
||||
&widgetContext, LayoutDeviceIntRect::FromUnknownRect(bounds));
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
if (AndroidDynamicToolbarAnimator::IsEnabled()) {
|
||||
// Depending on the content shift the toolbar may be rendered on top of
|
||||
|
|
|
|||
|
|
@ -160,11 +160,6 @@ class HostLayerManager : public LayerManager {
|
|||
}
|
||||
}
|
||||
|
||||
// Indicate that we need to composite even if nothing in our layers has
|
||||
// changed, so that the widget can draw something different in its window
|
||||
// overlay.
|
||||
void SetWindowOverlayChanged() { mWindowOverlayChanged = true; }
|
||||
|
||||
void SetPaintTime(const TimeDuration& aPaintTime) {
|
||||
mLastPaintTime = aPaintTime;
|
||||
}
|
||||
|
|
@ -223,7 +218,6 @@ class HostLayerManager : public LayerManager {
|
|||
UniquePtr<Diagnostics> mDiagnostics;
|
||||
uint64_t mCompositorBridgeID;
|
||||
|
||||
bool mWindowOverlayChanged;
|
||||
TimeDuration mLastPaintTime;
|
||||
TimeStamp mRenderStartTime;
|
||||
UniquePtr<CompositionRecorder> mCompositionRecorder = nullptr;
|
||||
|
|
|
|||
|
|
@ -263,10 +263,6 @@ mozilla::ipc::IPCResult LayerTransactionParent::RecvUpdate(
|
|||
edit.get_OpSetDiagnosticTypes().diagnostics());
|
||||
break;
|
||||
}
|
||||
case Edit::TOpWindowOverlayChanged: {
|
||||
mLayerManager->SetWindowOverlayChanged();
|
||||
break;
|
||||
}
|
||||
// Tree ops
|
||||
case Edit::TOpSetRoot: {
|
||||
MOZ_LAYERS_LOG(("[ParentSide] SetRoot"));
|
||||
|
|
|
|||
|
|
@ -428,7 +428,6 @@ struct OpRepositionChild { LayerHandle container; LayerHandle childLayer; Layer
|
|||
struct OpRaiseToTopChild { LayerHandle container; LayerHandle childLayer; };
|
||||
|
||||
struct OpSetDiagnosticTypes { DiagnosticTypes diagnostics; };
|
||||
struct OpWindowOverlayChanged { };
|
||||
|
||||
struct ShmemSection {
|
||||
Shmem shmem;
|
||||
|
|
@ -558,8 +557,7 @@ union Edit {
|
|||
OpCreateRefLayer;
|
||||
|
||||
OpSetDiagnosticTypes;
|
||||
OpWindowOverlayChanged;
|
||||
|
||||
|
||||
OpSetRoot;
|
||||
OpInsertAfter;
|
||||
OpPrependChild;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,6 @@ ShadowLayerForwarder::ShadowLayerForwarder(
|
|||
mMessageLoop(MessageLoop::current()),
|
||||
mDiagnosticTypes(DiagnosticTypes::NO_DIAGNOSTIC),
|
||||
mIsFirstPaint(false),
|
||||
mWindowOverlayChanged(false),
|
||||
mNextLayerHandle(1) {
|
||||
mTxn = new Transaction();
|
||||
if (TabGroup* tabGroup = mClientLayerManager->GetTabGroup()) {
|
||||
|
|
@ -565,9 +564,6 @@ bool ShadowLayerForwarder::EndTransaction(
|
|||
mDiagnosticTypes = diagnostics;
|
||||
mTxn->AddEdit(OpSetDiagnosticTypes(diagnostics));
|
||||
}
|
||||
if (mWindowOverlayChanged) {
|
||||
mTxn->AddEdit(OpWindowOverlayChanged());
|
||||
}
|
||||
|
||||
AutoTxnEnd _(mTxn);
|
||||
|
||||
|
|
@ -660,8 +656,6 @@ bool ShadowLayerForwarder::EndTransaction(
|
|||
return true;
|
||||
}
|
||||
|
||||
mWindowOverlayChanged = false;
|
||||
|
||||
info.cset() = std::move(mTxn->mCset);
|
||||
info.setSimpleAttrs() = std::move(setSimpleAttrs);
|
||||
info.setAttrs() = std::move(setAttrs);
|
||||
|
|
|
|||
|
|
@ -292,8 +292,6 @@ class ShadowLayerForwarder final : public LayersIPCActor,
|
|||
// compositor to shutdown.
|
||||
void SynchronouslyShutdown();
|
||||
|
||||
virtual void WindowOverlayChanged() { mWindowOverlayChanged = true; }
|
||||
|
||||
/**
|
||||
* The following Alloc/Open/Destroy interfaces abstract over the
|
||||
* details of working with surfaces that are shared across
|
||||
|
|
@ -424,7 +422,6 @@ class ShadowLayerForwarder final : public LayersIPCActor,
|
|||
DiagnosticTypes mDiagnosticTypes;
|
||||
bool mIsFirstPaint;
|
||||
FocusTarget mFocusTarget;
|
||||
bool mWindowOverlayChanged;
|
||||
nsTArray<PluginWindowData> mPluginWindowData;
|
||||
UniquePtr<ActiveResourceTracker> mActiveResourceTracker;
|
||||
uint64_t mNextLayerHandle;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ namespace layers {
|
|||
WebRenderLayerManager::WebRenderLayerManager(nsIWidget* aWidget)
|
||||
: mWidget(aWidget),
|
||||
mLatestTransactionId{0},
|
||||
mWindowOverlayChanged(false),
|
||||
mNeedsComposite(false),
|
||||
mIsFirstPaint(false),
|
||||
mTarget(nullptr),
|
||||
|
|
@ -191,16 +190,6 @@ bool WebRenderLayerManager::BeginTransaction(const nsCString& aURL) {
|
|||
}
|
||||
|
||||
bool WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) {
|
||||
if (mWindowOverlayChanged) {
|
||||
// If the window overlay changed then we can't do an empty transaction
|
||||
// because we need to repaint the window overlay which we only currently
|
||||
// support in a full transaction.
|
||||
// XXX If we end up hitting this branch a lot we can probably optimize it
|
||||
// by just sending an updated window overlay image instead of rebuilding
|
||||
// the entire WR display list.
|
||||
return false;
|
||||
}
|
||||
|
||||
// Since we don't do repeat transactions right now, just set the time
|
||||
mAnimationReadyTime = TimeStamp::Now();
|
||||
|
||||
|
|
@ -362,7 +351,6 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
|
|||
|
||||
mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder,
|
||||
resourceUpdates);
|
||||
mWindowOverlayChanged = false;
|
||||
if (dumpEnabled) {
|
||||
printf_stderr("(window overlay)\n");
|
||||
Unused << builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());
|
||||
|
|
|
|||
|
|
@ -176,7 +176,6 @@ class WebRenderLayerManager final : public LayerManager {
|
|||
}
|
||||
|
||||
void WrUpdated();
|
||||
void WindowOverlayChanged() { mWindowOverlayChanged = true; }
|
||||
nsIWidget* GetWidget() { return mWidget; }
|
||||
|
||||
dom::TabGroup* GetTabGroup();
|
||||
|
|
@ -215,7 +214,6 @@ class WebRenderLayerManager final : public LayerManager {
|
|||
// APZ to do it's job
|
||||
wr::RenderRootArray<WebRenderScrollData> mScrollDatas;
|
||||
|
||||
bool mWindowOverlayChanged;
|
||||
bool mNeedsComposite;
|
||||
bool mIsFirstPaint;
|
||||
FocusTarget mFocusTarget;
|
||||
|
|
|
|||
|
|
@ -127,14 +127,6 @@ class CompositorWidget {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after the LayerManager draws the layer tree
|
||||
*
|
||||
* Always called from the compositing thread.
|
||||
*/
|
||||
virtual void DrawWindowOverlay(WidgetRenderingContext* aContext,
|
||||
LayoutDeviceIntRect aRect) {}
|
||||
|
||||
/**
|
||||
* Return a DrawTarget for the window which can be composited into.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -49,11 +49,6 @@ InProcessCompositorWidget::GetNativeLayerRoot() {
|
|||
return mWidget->GetNativeLayerRoot();
|
||||
}
|
||||
|
||||
void InProcessCompositorWidget::DrawWindowOverlay(
|
||||
WidgetRenderingContext* aContext, LayoutDeviceIntRect aRect) {
|
||||
mWidget->DrawWindowOverlay(aContext, aRect);
|
||||
}
|
||||
|
||||
already_AddRefed<gfx::DrawTarget>
|
||||
InProcessCompositorWidget::StartRemoteDrawing() {
|
||||
return mWidget->StartRemoteDrawing();
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ class InProcessCompositorWidget : public CompositorWidget {
|
|||
virtual bool PreRender(WidgetRenderingContext* aManager) override;
|
||||
virtual void PostRender(WidgetRenderingContext* aManager) override;
|
||||
virtual RefPtr<layers::NativeLayerRoot> GetNativeLayerRoot() override;
|
||||
virtual void DrawWindowOverlay(WidgetRenderingContext* aContext,
|
||||
LayoutDeviceIntRect aRect) override;
|
||||
virtual already_AddRefed<gfx::DrawTarget> StartRemoteDrawing() override;
|
||||
virtual already_AddRefed<gfx::DrawTarget> StartRemoteDrawingInRegion(
|
||||
LayoutDeviceIntRegion& aInvalidRegion,
|
||||
|
|
|
|||
|
|
@ -448,9 +448,6 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
|
|||
virtual RefPtr<mozilla::layers::NativeLayerRoot> GetNativeLayerRoot() {
|
||||
return nullptr;
|
||||
}
|
||||
virtual void DrawWindowOverlay(
|
||||
mozilla::widget::WidgetRenderingContext* aContext,
|
||||
LayoutDeviceIntRect aRect) {}
|
||||
virtual already_AddRefed<DrawTarget> StartRemoteDrawing();
|
||||
virtual already_AddRefed<DrawTarget> StartRemoteDrawingInRegion(
|
||||
LayoutDeviceIntRegion& aInvalidRegion, BufferMode* aBufferMode) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue