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),
|
: mDebugOverlayWantsNextFrame(false),
|
||||||
mWarningLevel(0.0f),
|
mWarningLevel(0.0f),
|
||||||
mCompositorBridgeID(0),
|
mCompositorBridgeID(0),
|
||||||
mWindowOverlayChanged(false),
|
|
||||||
mLastPaintTime(TimeDuration::Forever()),
|
mLastPaintTime(TimeDuration::Forever()),
|
||||||
mRenderStartTime(TimeStamp::Now()) {}
|
mRenderStartTime(TimeStamp::Now()) {}
|
||||||
|
|
||||||
|
|
@ -618,7 +617,7 @@ void LayerManagerComposite::UpdateAndRender() {
|
||||||
invalid = mInvalidRegion;
|
invalid = mInvalidRegion;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invalid.IsEmpty() && !mWindowOverlayChanged) {
|
if (invalid.IsEmpty()) {
|
||||||
// Composition requested, but nothing has changed. Don't do any work.
|
// Composition requested, but nothing has changed. Don't do any work.
|
||||||
mClonedLayerTreeProperties = LayerProperties::CloneFrom(GetRoot());
|
mClonedLayerTreeProperties = LayerProperties::CloneFrom(GetRoot());
|
||||||
mProfilerScreenshotGrabber.NotifyEmptyFrame();
|
mProfilerScreenshotGrabber.NotifyEmptyFrame();
|
||||||
|
|
@ -646,7 +645,6 @@ void LayerManagerComposite::UpdateAndRender() {
|
||||||
|
|
||||||
if (!mTarget && rendered) {
|
if (!mTarget && rendered) {
|
||||||
mInvalidRegion.SetEmpty();
|
mInvalidRegion.SetEmpty();
|
||||||
mWindowOverlayChanged = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update cached layer tree information.
|
// Update cached layer tree information.
|
||||||
|
|
@ -1274,10 +1272,6 @@ bool LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion,
|
||||||
if (usingNativeLayers) {
|
if (usingNativeLayers) {
|
||||||
UpdateDebugOverlayNativeLayers();
|
UpdateDebugOverlayNativeLayers();
|
||||||
} else {
|
} else {
|
||||||
// Allow widget to render a custom foreground.
|
|
||||||
mCompositor->GetWidget()->DrawWindowOverlay(
|
|
||||||
&widgetContext, LayoutDeviceIntRect::FromUnknownRect(bounds));
|
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_ANDROID)
|
#if defined(MOZ_WIDGET_ANDROID)
|
||||||
if (AndroidDynamicToolbarAnimator::IsEnabled()) {
|
if (AndroidDynamicToolbarAnimator::IsEnabled()) {
|
||||||
// Depending on the content shift the toolbar may be rendered on top of
|
// 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) {
|
void SetPaintTime(const TimeDuration& aPaintTime) {
|
||||||
mLastPaintTime = aPaintTime;
|
mLastPaintTime = aPaintTime;
|
||||||
}
|
}
|
||||||
|
|
@ -223,7 +218,6 @@ class HostLayerManager : public LayerManager {
|
||||||
UniquePtr<Diagnostics> mDiagnostics;
|
UniquePtr<Diagnostics> mDiagnostics;
|
||||||
uint64_t mCompositorBridgeID;
|
uint64_t mCompositorBridgeID;
|
||||||
|
|
||||||
bool mWindowOverlayChanged;
|
|
||||||
TimeDuration mLastPaintTime;
|
TimeDuration mLastPaintTime;
|
||||||
TimeStamp mRenderStartTime;
|
TimeStamp mRenderStartTime;
|
||||||
UniquePtr<CompositionRecorder> mCompositionRecorder = nullptr;
|
UniquePtr<CompositionRecorder> mCompositionRecorder = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -263,10 +263,6 @@ mozilla::ipc::IPCResult LayerTransactionParent::RecvUpdate(
|
||||||
edit.get_OpSetDiagnosticTypes().diagnostics());
|
edit.get_OpSetDiagnosticTypes().diagnostics());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Edit::TOpWindowOverlayChanged: {
|
|
||||||
mLayerManager->SetWindowOverlayChanged();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// Tree ops
|
// Tree ops
|
||||||
case Edit::TOpSetRoot: {
|
case Edit::TOpSetRoot: {
|
||||||
MOZ_LAYERS_LOG(("[ParentSide] SetRoot"));
|
MOZ_LAYERS_LOG(("[ParentSide] SetRoot"));
|
||||||
|
|
|
||||||
|
|
@ -428,7 +428,6 @@ struct OpRepositionChild { LayerHandle container; LayerHandle childLayer; Layer
|
||||||
struct OpRaiseToTopChild { LayerHandle container; LayerHandle childLayer; };
|
struct OpRaiseToTopChild { LayerHandle container; LayerHandle childLayer; };
|
||||||
|
|
||||||
struct OpSetDiagnosticTypes { DiagnosticTypes diagnostics; };
|
struct OpSetDiagnosticTypes { DiagnosticTypes diagnostics; };
|
||||||
struct OpWindowOverlayChanged { };
|
|
||||||
|
|
||||||
struct ShmemSection {
|
struct ShmemSection {
|
||||||
Shmem shmem;
|
Shmem shmem;
|
||||||
|
|
@ -558,8 +557,7 @@ union Edit {
|
||||||
OpCreateRefLayer;
|
OpCreateRefLayer;
|
||||||
|
|
||||||
OpSetDiagnosticTypes;
|
OpSetDiagnosticTypes;
|
||||||
OpWindowOverlayChanged;
|
|
||||||
|
|
||||||
OpSetRoot;
|
OpSetRoot;
|
||||||
OpInsertAfter;
|
OpInsertAfter;
|
||||||
OpPrependChild;
|
OpPrependChild;
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,6 @@ ShadowLayerForwarder::ShadowLayerForwarder(
|
||||||
mMessageLoop(MessageLoop::current()),
|
mMessageLoop(MessageLoop::current()),
|
||||||
mDiagnosticTypes(DiagnosticTypes::NO_DIAGNOSTIC),
|
mDiagnosticTypes(DiagnosticTypes::NO_DIAGNOSTIC),
|
||||||
mIsFirstPaint(false),
|
mIsFirstPaint(false),
|
||||||
mWindowOverlayChanged(false),
|
|
||||||
mNextLayerHandle(1) {
|
mNextLayerHandle(1) {
|
||||||
mTxn = new Transaction();
|
mTxn = new Transaction();
|
||||||
if (TabGroup* tabGroup = mClientLayerManager->GetTabGroup()) {
|
if (TabGroup* tabGroup = mClientLayerManager->GetTabGroup()) {
|
||||||
|
|
@ -565,9 +564,6 @@ bool ShadowLayerForwarder::EndTransaction(
|
||||||
mDiagnosticTypes = diagnostics;
|
mDiagnosticTypes = diagnostics;
|
||||||
mTxn->AddEdit(OpSetDiagnosticTypes(diagnostics));
|
mTxn->AddEdit(OpSetDiagnosticTypes(diagnostics));
|
||||||
}
|
}
|
||||||
if (mWindowOverlayChanged) {
|
|
||||||
mTxn->AddEdit(OpWindowOverlayChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
AutoTxnEnd _(mTxn);
|
AutoTxnEnd _(mTxn);
|
||||||
|
|
||||||
|
|
@ -660,8 +656,6 @@ bool ShadowLayerForwarder::EndTransaction(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mWindowOverlayChanged = false;
|
|
||||||
|
|
||||||
info.cset() = std::move(mTxn->mCset);
|
info.cset() = std::move(mTxn->mCset);
|
||||||
info.setSimpleAttrs() = std::move(setSimpleAttrs);
|
info.setSimpleAttrs() = std::move(setSimpleAttrs);
|
||||||
info.setAttrs() = std::move(setAttrs);
|
info.setAttrs() = std::move(setAttrs);
|
||||||
|
|
|
||||||
|
|
@ -292,8 +292,6 @@ class ShadowLayerForwarder final : public LayersIPCActor,
|
||||||
// compositor to shutdown.
|
// compositor to shutdown.
|
||||||
void SynchronouslyShutdown();
|
void SynchronouslyShutdown();
|
||||||
|
|
||||||
virtual void WindowOverlayChanged() { mWindowOverlayChanged = true; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following Alloc/Open/Destroy interfaces abstract over the
|
* The following Alloc/Open/Destroy interfaces abstract over the
|
||||||
* details of working with surfaces that are shared across
|
* details of working with surfaces that are shared across
|
||||||
|
|
@ -424,7 +422,6 @@ class ShadowLayerForwarder final : public LayersIPCActor,
|
||||||
DiagnosticTypes mDiagnosticTypes;
|
DiagnosticTypes mDiagnosticTypes;
|
||||||
bool mIsFirstPaint;
|
bool mIsFirstPaint;
|
||||||
FocusTarget mFocusTarget;
|
FocusTarget mFocusTarget;
|
||||||
bool mWindowOverlayChanged;
|
|
||||||
nsTArray<PluginWindowData> mPluginWindowData;
|
nsTArray<PluginWindowData> mPluginWindowData;
|
||||||
UniquePtr<ActiveResourceTracker> mActiveResourceTracker;
|
UniquePtr<ActiveResourceTracker> mActiveResourceTracker;
|
||||||
uint64_t mNextLayerHandle;
|
uint64_t mNextLayerHandle;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ namespace layers {
|
||||||
WebRenderLayerManager::WebRenderLayerManager(nsIWidget* aWidget)
|
WebRenderLayerManager::WebRenderLayerManager(nsIWidget* aWidget)
|
||||||
: mWidget(aWidget),
|
: mWidget(aWidget),
|
||||||
mLatestTransactionId{0},
|
mLatestTransactionId{0},
|
||||||
mWindowOverlayChanged(false),
|
|
||||||
mNeedsComposite(false),
|
mNeedsComposite(false),
|
||||||
mIsFirstPaint(false),
|
mIsFirstPaint(false),
|
||||||
mTarget(nullptr),
|
mTarget(nullptr),
|
||||||
|
|
@ -191,16 +190,6 @@ bool WebRenderLayerManager::BeginTransaction(const nsCString& aURL) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) {
|
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
|
// Since we don't do repeat transactions right now, just set the time
|
||||||
mAnimationReadyTime = TimeStamp::Now();
|
mAnimationReadyTime = TimeStamp::Now();
|
||||||
|
|
||||||
|
|
@ -362,7 +351,6 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
|
||||||
|
|
||||||
mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder,
|
mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder,
|
||||||
resourceUpdates);
|
resourceUpdates);
|
||||||
mWindowOverlayChanged = false;
|
|
||||||
if (dumpEnabled) {
|
if (dumpEnabled) {
|
||||||
printf_stderr("(window overlay)\n");
|
printf_stderr("(window overlay)\n");
|
||||||
Unused << builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());
|
Unused << builder.Dump(/*indent*/ 1, Some(builderDumpIndex), Nothing());
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,6 @@ class WebRenderLayerManager final : public LayerManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WrUpdated();
|
void WrUpdated();
|
||||||
void WindowOverlayChanged() { mWindowOverlayChanged = true; }
|
|
||||||
nsIWidget* GetWidget() { return mWidget; }
|
nsIWidget* GetWidget() { return mWidget; }
|
||||||
|
|
||||||
dom::TabGroup* GetTabGroup();
|
dom::TabGroup* GetTabGroup();
|
||||||
|
|
@ -215,7 +214,6 @@ class WebRenderLayerManager final : public LayerManager {
|
||||||
// APZ to do it's job
|
// APZ to do it's job
|
||||||
wr::RenderRootArray<WebRenderScrollData> mScrollDatas;
|
wr::RenderRootArray<WebRenderScrollData> mScrollDatas;
|
||||||
|
|
||||||
bool mWindowOverlayChanged;
|
|
||||||
bool mNeedsComposite;
|
bool mNeedsComposite;
|
||||||
bool mIsFirstPaint;
|
bool mIsFirstPaint;
|
||||||
FocusTarget mFocusTarget;
|
FocusTarget mFocusTarget;
|
||||||
|
|
|
||||||
|
|
@ -127,14 +127,6 @@ class CompositorWidget {
|
||||||
return nullptr;
|
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.
|
* Return a DrawTarget for the window which can be composited into.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,6 @@ InProcessCompositorWidget::GetNativeLayerRoot() {
|
||||||
return mWidget->GetNativeLayerRoot();
|
return mWidget->GetNativeLayerRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InProcessCompositorWidget::DrawWindowOverlay(
|
|
||||||
WidgetRenderingContext* aContext, LayoutDeviceIntRect aRect) {
|
|
||||||
mWidget->DrawWindowOverlay(aContext, aRect);
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<gfx::DrawTarget>
|
already_AddRefed<gfx::DrawTarget>
|
||||||
InProcessCompositorWidget::StartRemoteDrawing() {
|
InProcessCompositorWidget::StartRemoteDrawing() {
|
||||||
return mWidget->StartRemoteDrawing();
|
return mWidget->StartRemoteDrawing();
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,6 @@ class InProcessCompositorWidget : public CompositorWidget {
|
||||||
virtual bool PreRender(WidgetRenderingContext* aManager) override;
|
virtual bool PreRender(WidgetRenderingContext* aManager) override;
|
||||||
virtual void PostRender(WidgetRenderingContext* aManager) override;
|
virtual void PostRender(WidgetRenderingContext* aManager) override;
|
||||||
virtual RefPtr<layers::NativeLayerRoot> GetNativeLayerRoot() 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> StartRemoteDrawing() override;
|
||||||
virtual already_AddRefed<gfx::DrawTarget> StartRemoteDrawingInRegion(
|
virtual already_AddRefed<gfx::DrawTarget> StartRemoteDrawingInRegion(
|
||||||
LayoutDeviceIntRegion& aInvalidRegion,
|
LayoutDeviceIntRegion& aInvalidRegion,
|
||||||
|
|
|
||||||
|
|
@ -448,9 +448,6 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
|
||||||
virtual RefPtr<mozilla::layers::NativeLayerRoot> GetNativeLayerRoot() {
|
virtual RefPtr<mozilla::layers::NativeLayerRoot> GetNativeLayerRoot() {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
virtual void DrawWindowOverlay(
|
|
||||||
mozilla::widget::WidgetRenderingContext* aContext,
|
|
||||||
LayoutDeviceIntRect aRect) {}
|
|
||||||
virtual already_AddRefed<DrawTarget> StartRemoteDrawing();
|
virtual already_AddRefed<DrawTarget> StartRemoteDrawing();
|
||||||
virtual already_AddRefed<DrawTarget> StartRemoteDrawingInRegion(
|
virtual already_AddRefed<DrawTarget> StartRemoteDrawingInRegion(
|
||||||
LayoutDeviceIntRegion& aInvalidRegion, BufferMode* aBufferMode) {
|
LayoutDeviceIntRegion& aInvalidRegion, BufferMode* aBufferMode) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue